Login  Register

Connection between -Xmx and GL_OUT_OF_MEMORY?

Posted by painofangels on Mar 28, 2012; 10:38am
URL: https://forum.jogamp.org/Connection-between-Xmx-and-GL-OUT-OF-MEMORY-tp3864149.html

Hi,

I've encountered several weird cases of calls to glTexImage3d where I get GL_OUT_OF_MEMORY exceptions when allocating GPU-memory for a texture. Note that I do not upload any actual pixel data ( glTexImage3D(..,..,.., null ) ).
In my test-case I'm trying to allocate ~100MB of GPU memory, which should be perfectly fine with 2GB memory available and GPU-Z reporting only ~70MB used memory.

Somehow I tracked the problem down to the Java Heap size. With "-Xmx1000M" I assigned 1000MB max heap memory to the Java-vm. When I completely delete that flag however, the GL_OUT_OF_MEMORY exceptions do NOT occur and the texture space is allocated just fine.

Do any of you guys have a clue how these two things could be connected? Since I'm only allocating GPU-memory and do not upload any pixels, one thing should not affect the other IMO.

Thanks for any hints ;)