FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Any significant changes to memory handling in 1.3.3?

2 posters

Go down

Any significant changes to memory handling in 1.3.3? Empty Any significant changes to memory handling in 1.3.3?

Post  autology Wed Mar 04, 2009 9:09 am

I have a 1.3.1 project ~ 98% complete pending a few model optimizations and debugging of a memory leak (100% feature complete). Should I finish using 1.3.1 or are the improvements from 1.3.1-> 1.3.3 worth making the upgrade for? I am primarily concerned with memory usage (general and VRAM).

Thoughts?

autology

Posts : 22
Join date : 2008-12-29

Back to top Go down

Any significant changes to memory handling in 1.3.3? Empty Re: Any significant changes to memory handling in 1.3.3?

Post  sio2interactive Wed Mar 04, 2009 3:47 pm

Trust me SIO2 is REALLY small in memory, If I was you, I would be more concerned about the size of my textures Wink cuz that is what is killing on the device...

Example: 1 x 1024 x 1024 RGB with mipmap takes the following amount of memory:


1024 x 1024 x 3 = 3, 145, 728
512 x 512 x 3 = 786, 432
256 x 256 x 3 = 196, 608
128 x 128 x 3 = 49, 152
64 x 64 x 3 = 12, 288
32 x 32 x 3 = 3, 072
16 x 16 x 3 = 768
8 x 8 x 3 = 192
4 x 4 x 3 = 48
2 x 2 x 3 = 12
1 x 1 x 3 = 3

total: 4, 194, 303 bytes

The main limitation of your app on the device is about 64Mb (since the OS is taking already most the the 128Mb total memory), you cannot go up that # on the device where 24Mb CAN be VRAM.

So you application should be somewhere between theses 2 limits:

Max Ram: 40Mb
Max VRAM: 24Mb


If you go above 64Mb (bypassing the 128Mb limit), the firmware will probably reboot, if you go above the 24Mb of VRAM things are going to be more than slow and sometimes can even send GL_OUT_OF_MEMORY, which means that GL cannot even go on software...

So basically Im telling you the real problem is the texture size, all the rest is pretty small... in v1.3.3 there is a new function: sio2ResourceGetVRAMSize, this returns you the exact amount of VRAM a specific resource is using, that might be helpful to you as well...

Cheers,
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Any significant changes to memory handling in 1.3.3? Empty Re: Any significant changes to memory handling in 1.3.3?

Post  autology Wed Mar 04, 2009 4:56 pm

Thanks for the prompt (and full) reply - You're correct and I'm continually amazed by this little engine and piece of kit. I was able to trace my memory issue to the soundengine source code that Apple has removed from their example code (for good reason).

For anyone interested - I'm using now the AVfoundation to stream audio (called from the app delegate) during loading of the sio2 resources. This solution works fairly well as long as you don't require positional audio.

I likely stay in 1.3.1 until I get the app to the store. After that comes my dissertation and then hopefully transitioning to 1.3.3+ and updating my lookat code to include _sio2transform.

Re: sio2ResourceGetVRAMSize - I was tempted initially but I was able to make due with the openGLES sampling in Instruments.

autology

Posts : 22
Join date : 2008-12-29

Back to top Go down

Any significant changes to memory handling in 1.3.3? Empty Re: Any significant changes to memory handling in 1.3.3?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum