Jet and Memory Usage

Started by psiegel, July 09, 2003, 15:30:51

Previous topic - Next topic

psiegel

I was evaluating the memory usage of my app recently,  in an attempt to set the optimal heap size in Excelsior Jet.  I expect most of my memory usage to go to sounds and images, but I wasn't sure exactly what is responsible for this memory.  That is, once I've loaded an image into OpenGL as a texture, or once I've loaded a sound as an OpenAL source, is the memory still being managed by the Jet VM, or is it solely being managed by LWJGL?   In the former case I'd expect to set the heap size on Jet very high, as it's responsible for all memory usage of the app.  If it's the latter, I think it should probably be set very low, as the majority of the memory is being off-loaded to the LWJGL dll.

Paul

princec

Once it's gone to GL, it's still in the process space, but it's no longer managed by Java or Jet. The Jet settings are concerned solely with the size of the Java heap (same as with Hotspot).

Cas :)

psiegel

So the Jet heap can be set relatively low, provided the images and sounds are filtered into AL/GL one at a time and the sources always released from memory, right?

Paul

elias


princec

You can load all your images outside the Java heap if you load them directly into direct ByteBuffers too (as these exist outside the Java heap as well).

Cas :)

psiegel

Yeah, the intermediary memory is less important to me, as I always free it up as soon as I've loaded it into AL/GL.  I think I might actually be using ByteBuffers already anyway.  But that is good to know.  Thanks.

Paul