Hello Guest

Jet and Memory Usage

  • 5 Replies
  • 11735 Views
Jet and Memory Usage
« on: July 09, 2003, 15:30:51 »
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

*

Offline princec

  • *****
  • 1933
    • Puppygames
Jet and Memory Usage
« Reply #1 on: July 09, 2003, 16:37:24 »
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 :)

Jet and Memory Usage
« Reply #2 on: July 09, 2003, 16:58:31 »
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

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Jet and Memory Usage
« Reply #3 on: July 09, 2003, 16:59:33 »
right. :-)

 - elias

*

Offline princec

  • *****
  • 1933
    • Puppygames
Jet and Memory Usage
« Reply #4 on: July 10, 2003, 09:49:53 »
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 :)

Jet and Memory Usage
« Reply #5 on: July 10, 2003, 12:47:13 »
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