Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Introduction to memory management

Programs consist of a number of processes, each of which contains one or more conceptually concurrent threads of execution.

A thread is the unit of execution within a process. Every time a process is initialised a primary thread is created. For many applications the primary thread is the only thread that the application requires; however, processes can create additional threads.

Each user process has its own private address space, i.e. a collection of memory regions which that process can access. A user process cannot directly address memory areas in the address space of another process. There is also a special process, the Kernel process, whose threads run at supervisor privilege level. This process normally contains two threads:

The address space of a process consists of a number of chunks, where a chunk is a region of RAM mapped into contiguous linear addresses. On creation, a user process contains one thread (the main thread) and one to three chunks; these are:

If a process creates additional threads, then a new chunk is created for each new thread. Each chunk contains the thread's stack; if a new thread is not sharing an existing heap, then the chunk also contains a new heap.