Out of Memory with 800 x 480 display using Glide

I have a 5" 800x480 display that I seem to get out of memory with just a simple app that creates a window.

I am running Glide with a ChipworkX module.

THis is the output from the GC prior to calling the GlideLoader.LoadWindow() function


Type 0F (STRING              ):   1560 bytes
Type 11 (CLASS               ):   4692 bytes
Type 12 (VALUETYPE           ):   3816 bytes
Type 13 (SZARRAY             ):   5688 bytes
Type 15 (FREEBLOCK           ): 58941780 bytes
Type 16 (CACHEDBLOCK         ):     72 bytes
Type 17 (ASSEMBLY            ):  29640 bytes
Type 18 (WEAKCLASS           ):    288 bytes
Type 19 (REFLECTION          ):    192 bytes
Type 1B (DELEGATE_HEAD       ):    432 bytes
Type 1D (OBJECT_TO_EVENT     ):     48 bytes
Type 1E (BINARY_BLOB_HEAD    ): 772908 bytes
Type 1F (THREAD              ):    384 bytes
Type 20 (SUBTHREAD           ):     48 bytes
Type 21 (STACK_FRAME         ):    408 bytes
Type 27 (FINALIZER_HEAD      ):    216 bytes
Type 31 (IO_PORT             ):     72 bytes
Type 34 (APPDOMAIN_HEAD      ):     72 bytes
Type 36 (APPDOMAIN_ASSEMBLY  ):   3744 bytes

From what I can see, there is ample free memory available. Some 58MB.

I am assuming the BITMAP would be 800x480x16 which is around 6MB.

The way I plan to code this, only 1 window would be active at any one time and in memory. The previous one is disposed of prior to the new one being created. This has worked well in a previous app with the 4.3" LCD and multiple windows.

How does the G120 work with the CP7 panel, which has the same resolution? It has far less memory than the ChipworkX.

You need ot increase the custom heap size. http://www.ghielectronics.com/docs/58/custom-heap-large-objects

What a productive night.

Thanks for the help Gus.

Now to get the capacitive touch to work! :slight_smile: