Virtual Memory Map in Symbian OS
The basic map of virtual memory usage in Symbian OS.
The two memory areas of interest are the home area and the run area.
The home area is where the data chunks for a process are kept when the process has been launched but is not the currently active process. The home area is a protected region of memory – only kernel-level code can read and write it. When a process is scheduled to execute, its data chunks are moved (remapped via the MMU) from the home area of virtual memory to the area known as the run area, and process execution starts. You can think of the run area as a sort of stage for processes, and the home area as the backstage area. When a process is ready to perform, it goes on stage – i.e. its data chunks are moved to the run area, and the process executes.
Why aren’t the process data chunks simply left in the home area when the process executes? The reason is that the process code always expects its data to reside in the same place. This is because the linker places data address references (when code references a static variable, for example) in the code image at build time. Thus, the process code expects its data in the single place specified by the linker (i.e. the run area) – no matter what instance of the program is running. Note, however, that code chunks are never moved to the run area. This is because, unlike data chunks, you do not have separate copies of code for each process instance and the code can be run from its location in the home area.