Stack Size and Heap Size

On Symbian OS, by default, the default stack size for an application is 8 KB. However, it can be adjusted by using the EPOCSTACKSIZE keyword in the project's MMP file. For example:

EPOCSTACKSIZE 0x5000

The statement above changes the stack size of the executable to 20 KB (0 x 5000 bytes in hexadecimal or 20,480 byes in decimal). The maximum stack size is 80 KB.

The default minimum heap size for an application is 4 KB. The default maximum heap size is 1 MB. Both can be adjusted, again in the project's MMP file, using the macro EPOCHEAPSIZE. For example:

EPOCHEAPSIZE 0x5000 0x100000

The statement above changes the default minimum heap size to 20 KB (0 x 5000 bytes) and the maximum heap size to 1 MB (0 x 10000 bytes). What does it mean?

• The process cannot be started if the available memory is less than 20 KB.

• The process cannot consume heap memory more than 1 MB.

0 0

Post a comment

  • Receive news updates via email from this site