cmontiel
Member
|
Memory and States.
Inmediatly after calling SomeState.set(1.f); by first time, EE reserves 40Mg in RAM.
This happen before Shutdown of the current state is called and before Init of SomeState. So aren't my functions. This memory keeps in use all the time.
In my game, 61 mg goes to 97 mg. Obviously this is not viable for an iOS / Android game.
Why this memory is being reserved? How to avoid it?
Ok, I did found how to avoid it.
StateLogin.set(); or StateLogin.set(0.f); don't use fade effect and the 40 Mg aren't allocated...
But why?
IRC: irc.freenode.net
Channel: #Esenthel
(This post was last modified: 06-22-2012 03:49 PM by cmontiel.)
|
|
06-22-2012 03:32 PM |
|
Esenthel
Administrator
|
RE: Memory and States.
there can be 1-3 render targets needed for fading effect.
memory usage depends on the screen resolution.
on mobile devices memory usage is smaller. the fading works ok on mobile's, I did test it for my sample project and it's okey.
|
|
06-22-2012 04:03 PM |
|
cmontiel
Member
|
RE: Memory and States.
Quote:memory usage depends on the screen resolution.
Understood. I guess you didn't test it on iPad3. With a resolution of 2048x1536, fade effect allocates 40Mg on iOS.
And here is the prove:
12*3 = 36 mg.
I'm not trying to give you more work. I will not use fade effect , no prob.
IRC: irc.freenode.net
Channel: #Esenthel
(This post was last modified: 06-22-2012 04:55 PM by cmontiel.)
|
|
06-22-2012 04:21 PM |
|
Esenthel
Administrator
|
RE: Memory and States.
(I've edited my previous post, on opengl there are up to 3 render targets used)
yes, that's expected, 2048width*1536height*4bytes*3rts=36MB, ipad3 has 1GB ram, so it's not an issue
|
|
06-22-2012 08:27 PM |
|
Esenthel
Administrator
|
RE: Memory and States.
this will be improved for next sdk
|
|
02-25-2013 03:44 PM |
|
cmontiel
Member
|
RE: Memory and States.
Thanks, glad to see you don't forget things like this . It's important to keep an optimized memory usage.
IRC: irc.freenode.net
Channel: #Esenthel
(This post was last modified: 02-25-2013 05:53 PM by cmontiel.)
|
|
02-25-2013 04:17 PM |
|