Main Site Documentation

Query related to "SetCustomHeapSize"


#1

I am working with FEZ Cobra with 7 Inch LCD. I want to show multiple images on LCD throughout the project execution span, so I have set custom heap-size for 11 MB. If I set less than 11MB, the program is not executing. I have design the code as, when some on touch the image it should open a popup window with some info. Some threading processes are accessing UART in background.

Now I have two queries.

  1. When I touch any image it executes popup window, but at the same time GC also execute. After some continuous touch, GC could not able to allocate memory and the program stops. Any suggestions how to resolve this?

  2. If I am using 11 MB custom heap, from where program will assign the memory? Is it assigned from RAM? Maximum how much heap size i can set?


#2

Try to force GC before handling the touch. Available RAM is 12M.

http://www.ghielectronics.com/catalog/compare/


#3

If you need 11MB custom heap then you are no planning your code properly. An large image takes just under 1MB and a typical application needs about 4 simultaneously so 4MB will be plenty.