14 views
in System Integration by

Hello World!

I am trying to use Embedded Wizard Platform Package 11.0 with low ram. so when I open EW_PRINT_MEMORY_USAGE,  I found the ram doesn't get lower when I switch to another dialog. But in Memory (RAM) usage , I found switching to another dialog will trigger garbage collection. So the Memory (RAM) usage is actually lower than the actual using.

I'm curious about how and when will the garbage collection be triggered, and since I have to use this in low ram, how can I trigger the garbage collection more frequently?

this is my config:

FRAME_BUFFER_HEIGHT          320

FRAME_BUFFER_WIDTH           320

MEMORY_POOL_SIZE               300*1024

MAX_STRING_CACHE_SIZE       32*1024

MAX_SURFACE_CACHE_SIZE     100*1024

MAX_GLYPH_SURFACE_WIDTH  64

MAX_GLYPH_SURFACE_HEIGHT 64

MAX_ISSUE_TASKS                     100

 

Thanks in advance!

1 Answer

0 votes
by

Hello,

first of all, please let us know, which target you are using and which Build Environment you are using as starting point for your own development.

Next, let me recommend to see our article about the Memory Footprint, which explains a lot of details about this topic.

To answer your question, the garbage collection is triggered within the main loop - see section triggering the garbage collection. Please note, that the estimation given within the memory (RAM) usage window shows the absolute minimum, based on an adequate system configuration.

As your memory pool contains only 300 KByte, please try the following settings:

FRAME_BUFFER_HEIGHT          320

FRAME_BUFFER_WIDTH           320

MEMORY_POOL_SIZE             300*1024

MAX_STRING_CACHE_SIZE        4*1024

MAX_SURFACE_CACHE_SIZE       0

MAX_GLYPH_SURFACE_WIDTH      64

MAX_GLYPH_SURFACE_HEIGHT     64

MAX_ISSUE_TASKS              10

Does this help?

Best regards,

Manfred

ago by

hello

I am using NXP1062 as  Build Environment

Since NXP1062 only has outside Flash, the direct bitmap resource will load slow. And actually my Rom size is also small with 1.5M. 

When I set MAX_SURFACE_CACHE_SIZE as zero, my compressed resource cannot load...

So I wonder why the Memory (RAM) usage is lower than the actual using.

Is there any way to trigger the garbage collection more  frequently like Force garbage collection?

ago by

Hello,

of course, using direct access of bitmaps will be slower than accessing bitmaps within the RAM.

However, if you set MAX_SURFACE_CACHE_SIZE as zero, this has only an impact to unused bitmap resources kept in the memory. What error messages do you get within the console output?

Please let me know the entire settings within the ewconfig.h file.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...