[solved]java.lang.OutOfMemoryError: Direct buffer memory

im trying to load a model which has alot of textures on it. but none of them is bigger than 2048*2048. and to avoid loading too much textures all at once. i sperated the model into several pieces and load each piece at a time using a for loop.



my vm memory is set to xms512m xmx1024m. but i still cannot load the model coz of this java.lang.OutOfMemoryError: Direct buffer memory error.



i convert all the model files and texture files into jme binary files using binary exporter. and the total size of the textures is 159MB and total size of models is 814kb



what should i do?



HELp!!!

The memory allocated to direct buffers is not the same as the one allocated for general purpose heap. I believe it can be changed through a JVM command line option -XX:MaxDirectMemorySize=<size>



Good luck

solved thx alot! :smiley:

hi i’m a newbie here and i would like to ask for your help where can i see the jvm command line option so that i can change the size like what neakor had said(JVM command line option -XX:MaxDirectMemorySize=) because i also having the same error as this. please help me. your answer will really be appreciated. thanks again in advance!

oh duenez i mean …

@chacha: rtfm? In the project settings.