A.2. Run-time Impact of a New Process

A.2.1. RAM

The RAM impact of a new process depends on the type of smartphone you are targeting since this determines the following key factors:

  • whether the code executed by the process is run from XIP or non-XIP flash

  • which memory model is being used.

The RAM used by a process also includes the RAM used by at least one thread since a process cannot exist without a main thread. As discussed above, a thread uses an absolute minimum of 9 KB. However, this assumed there was another thread to share a heap with. If there is only a single thread in a process this isn't possible and the absolute minimum RAM used by a single thread is 13 KB. The default RAM usage for a thread isn't affected by this and so is still at least 17 KB.

A process also uses RAM for a number of other factors such as the amount of code loaded into the process, additional kernel objects, page tables, etc. This all adds up to the following absolute minimum RAM usage shown in Table A.1.

Table A.1. RAM Used by a Process
 XIP CodeNon-XIP code
 Absolute MinimumDefault MinimumAbsolute MinimumDefault Minimum
Moving memory model17 KBAt least 21 KB21 KBAt least 25 KB
Multiple memory model25 KBAt least 29 KB30 KBAt least 34 KB

A.2.2. Memory Model Limitations

An additional concern when creating a new process is that there is a fixed limit on how many processes can be running at the same time. On the moving memory model, the limit is 1000 simultaneously running processes, while on the multiple ...

Get Common Design Patterns for Symbian OS: The Foundations of Smartphone Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.