What is the minimum memory footprint of an Embedded Wizard UI application?

713 views
asked Oct 14, 2015 in System Integration by Customer
Is it possible to estimate the absolute minimum memory footprint of an UI application based on Embedded Wizard?

1 Answer

0 votes
answered Oct 14, 2015 by EmWi Support

Embedded Wizard can be used to create UI applications for a wide range of targets, with different color formats, with or without graphics acceleration and with or without an operating system.
In order to support low-end targets with hard memory constraints, the minimum memory footprint has to be estimated. This article describes how the footprint can be estimated or reduced.

First of all, there is no simple answer concerning the minimum footprint, because it depends...
The memory footprint depends on your application, your graphical resources, your software design,...
Nevertheless, we can assume a certain UI application and different color formats and display resolutions in order make some realistic calculations.

Let's assume we have a simple UI application containing some menus, some text objects and some icons (e.g. 30 Icons each with 32x32 pixel).
In order to save memory, we reduce the surface cache to 0. In this case only those bitmaps are kept within the cache, which are currently needed. As soon as a bitmap is no more in use, it will be removed from the cache.
To simplify the calculation, we assume, that the application is using all image resources at the same time.
Additionally, we configure the font glyph cache to a minimum size of 128x128 pixel.

Case 1: 320 x 240 @ Index8 (8 bit)
Assuming a target with Index8 color format and a display size of 320 x 240 pixel, the following amount of memory is required:

    Chora Objects                                           8 kByte
    Strings                                                 2 kByte
    Bitmap Resources (ca. 30 kPix * 1 Byte)                30 kByte
    Resource Data Structure                                 4 kByte
    Font Cache (128x128 Pix)                               16 kByte
    Internal                                               16 kByte
    CLUT                                                    1 kByte
    ---------------------------------------------------------------
    Total                                                  77 kByte
    plus visible Framebuffer 320x240 Pix * 1 Byte          75 kByte
    plus optional Doublebuffer 320x240 Pix * 1 Byte        75 kByte 
    ---------------------------------------------------------------
    Overall                                               227 kByte

Case 2: 320 x 240 @ RGBA4444 (16 bit)
Assuming a target with RGBA4444 (16 bit) color format and a display size of 320 x 240 pixel, the following amount of memory is required:

    Chora Objects                                           8 kByte
    Strings                                                 2 kByte
    Bitmap Resources (ca. 30 kPix * 2 Byte)                60 kByte
    Resoure Data Structure                                  4 kByte
    Font Cache (128x128 Pix)                               16 kByte
    Internal                                               16 kByte
    ---------------------------------------------------------------
    Total                                                 106 kByte
    plus visible Framebuffer 320x240 Pix * 2 Byte         150 kByte
    plus optional Doublebuffer 320x240 Pix * 2 Byte       150 kByte 
    ---------------------------------------------------------------
    Overall                                               406 kByte

Case 3: 320 x 240 @ RGB565 (16 bit)
Assuming a target with RGB565 (16 bit) color format and a display size of 320 x 240 pixel, the following amount of memory is required:

    Chora Objects                                           8 kByte
    Strings                                                 2 kByte
    Bitmap Resources (ca. 30 kPix * 4 Byte) (*)           120 kByte
    Resoure Data Structure                                  4 kByte
    Font Cache (128x128 Pix)                               16 kByte
    Internal                                               16 kByte
    ---------------------------------------------------------------
    Total                                                 166 kByte
    plus visible Framebuffer 320x240 Pix * 2 Byte         150 kByte
    plus optional Doublebuffer 320x240 Pix * 2 Byte       150 kByte 
    ---------------------------------------------------------------
    Overall                                               466 kByte

(*) In case of RGB565 framebuffer format, the Graphics Engine still operates in RGBA8888 format to support alpha blending - bitmap resources are still 32 bits per pixel.

Case 4: 320 x 240 @ RGB888 (24 bit)
Assuming a target with RGB888 (24 bit) color format and a display size of 320 x 240 pixel, the following amount of memory is required:

    Chora Objects                                           8 kByte
    Strings                                                 2 kByte
    Bitmap Resources (ca. 30 kPix * 4 Byte) (*)           120 kByte
    Resoure Data Structure                                  4 kByte
    Font Cache (128x128 Pix)                               16 kByte
    Internal                                               16 kByte
    ---------------------------------------------------------------
    Total                                                 166 kByte
    plus visible Framebuffer 320x240 Pix * 3 Byte         225 kByte 
    plus optional Doublebuffer 320x240 Pix * 3 Byte       225 kByte
    ---------------------------------------------------------------
    Overall                                               616 kByte

(*) In case of RGB888 framebuffer format, the Graphics Engine still operates in RGBA8888 format to support alpha blending - bitmap resources are still 32 bits per pixel.

Case 5: 320 x 240 @ RGBA8888 (32 bit)
Assuming a target with RGBA8888 (32 bit) color format and a display size of 320 x 240 pixel, the following amount of memory is required:

    Chora Objects                                           8 kByte
    Strings                                                 2 kByte
    Bitmap Resources (ca. 30 kPix * 4 Byte)               120 kByte
    Resoure Data Structure                                  4 kByte
    Font Cache (128x128 Pix)                               16 kByte
    Internal                                               16 kByte
    ---------------------------------------------------------------
    Total                                                 166 kByte
    plus visible Framebuffer 320x240 Pix * 4 Byte         300 kByte 
    plus optional Doublebuffer 320x240 Pix * 4 Byte       300 kByte
    ---------------------------------------------------------------
    Overall                                               766 kByte

Other display resolutions or the usage of more resources may increase to footprint accordingly.

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

...