as my game evolves, i begun to run into memory issues. game itself runs ok, fits the budget, but these things typically happens after pressing home and returning back. see the exception below.
i guess this happens when jPCT tries to restore textures after a GL surface lost. i dispose the FrameBuffer, null the reference and call MemoryHelper.compact() before creating a new one.
what else can i do?
E/dalvikvm-heap( 6803): 131072-byte external allocation too large for this process.
W/OSMemory( 6803): External allocation of 131072 bytes was rejected
W/dalvikvm( 6803): threadid=15: thread exiting with uncaught exception (group=0x4001b178)
E/AndroidRuntime( 6803): Uncaught handler: thread GLThread 8 exiting due to uncaught exception
E/AndroidRuntime( 6803): java.lang.OutOfMemoryError
E/AndroidRuntime( 6803): at org.apache.harmony.luni.platform.OSMemory.malloc(Native Method)
E/AndroidRuntime( 6803): at org.apache.harmony.luni.platform.PlatformAddressFactory.alloc(PlatformAddressFactory.java:145)
E/AndroidRuntime( 6803): at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:67)
E/AndroidRuntime( 6803): at java.nio.ReadWriteDirectByteBuffer.<init>(ReadWriteDirectByteBuffer.java:51)
E/AndroidRuntime( 6803): at java.nio.BufferFactory.newDirectByteBuffer(BufferFactory.java:95)
E/AndroidRuntime( 6803): at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:71)
E/AndroidRuntime( 6803): at com.threed.jpct.GLRenderer.convertTexture(GLRenderer.java:754)
E/AndroidRuntime( 6803): at com.threed.jpct.GLRenderer.blit(GLRenderer.java:1265)
E/AndroidRuntime( 6803): at com.threed.jpct.GLRenderer.execute(GLRenderer.java:1661)
E/AndroidRuntime( 6803): at com.threed.jpct.FrameBuffer.blit(FrameBuffer.java:591)
E/AndroidRuntime( 6803): at raft.glgui.android.TexturePack.blit(TexturePack.java:256)