Symbian3/PDK/Source/GUID-9781C95D-4606-57FB-9F62-B7CC45DDD968.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-9781C95D-4606-57FB-9F62-B7CC45DDD968" xml:lang="en"><title>Flexible
Memory Model Guide</title><shortdesc>Overview of the Symbian platform flexible memory model</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-8F4D5E77-D4CC-48DD-AA11-77191A19C6FE"><title>Design</title> <p>The flexible memory model implements the
address space using these objects: </p> <ul>
<li id="GUID-416CE3F1-C16C-5686-BAAD-79CAD188DC28"><p>memory objects, </p> </li>
<li id="GUID-512A3E93-FAF3-593B-A490-5BB8C7A0925D"><p>memory managers, </p> </li>
<li id="GUID-31E356AA-A82F-5BDD-BEB5-1F97596BC642"><p>memory mappings, and </p> </li>
<li id="GUID-E67E19A3-E970-575E-9D80-FD50F756EB8B"><p>address space objects. </p> </li>
</ul> </section>
<section id="GUID-50C7D629-8818-4863-AE74-EF9835D1BC97"><title>Memory Objects</title><p>A memory object abstracts physical
memory. It represents storage for chunks, code and thread stacks. A memory
object is implemented as an array of physical page addresses. Attributes such
as 'cached', 'uncached', 'device' and 'strongly ordered' are common to all
the memory in the object. </p></section>
<section id="GUID-F1B26B2A-87F8-4363-902A-525B6AB92F8E"><title>Memory Managers</title><p>A memory manager performs operations
on memory objects such as allocating and freeing memory. Different types of
memory have different kinds of memory manager, for instance paged and unpaged
memory. </p></section>
<section id="GUID-A2CEF774-C4E9-4401-81A7-EB038C52BDC6"><title>Memory Mappings</title><p>Memory mappings exist to map virtual
memory on to physical memory. One or more memory mappings are associated with
one or more memory objects and their managers. Permissions, sharing and pinning
are implemented at the level of the memory mapping. Permissions include read/write
permissions, user/supervisor permissions and execute/no-execute permissions. </p></section>
<section id="GUID-FA9AD4F3-863F-4471-9DB4-AFAF3525D657"><title>Address Space Objects</title><p>Address space objects model
the address space of a process, that is the virtual address region used by
the process. An address space contains a list of memory mappings through which
the corresponding physical memory is accessed. </p></section>
<section id="GUID-B810FD8F-9C64-40D7-ABCD-87708A7EDBB0"><title>Changes</title> <p>Kernel developers need to know about certain
differences between the flexible memory model and the multiple memory model
which was used in previous versions of Symbian platform. </p> <p>In the multiple
memory model, memory was managed at the level of the chunk. Chunks were wrapped
round page tables of 1Mb and permissions and sharing were properties of the
chunk. Address space was partitioned into local, shareable and code memory
and shared memory had to be reserved at this level (that is, in units of 1Mb). </p> <p>The
transition to the flexible memory model involved two important changes. </p> <ul>
<li id="GUID-F1BA82A1-FC0B-5D27-8106-61313B0FC7C8"><p>Two processes sharing
the same chunk may use different virtual addresses to access it. Old code
which assumes that a chunk has a single virtual address may need to be rewritten. </p> </li>
<li id="GUID-FB107346-DB07-5BC6-AA04-A94E0E62F958"><p>The kernel no longer
creates chunks to store thread stacks and static data for each process. </p> </li>
</ul> <p>In two other respects the multiple memory model and the flexible
memory model are exactly the same: </p> <ul>
<li id="GUID-FB17CC7E-7187-5857-A124-4BA7E08F68ED"><p>Hardware chunks are
addressed globally. </p> </li>
<li id="GUID-34F3B419-D83A-5EFB-BDAA-2D518E78EC20"><p>Shared chunks have fixed
kernel addresses which are accessible in supervisor mode. </p> </li>
</ul> </section>
<section id="GUID-23B4066A-C3B1-47D9-834E-45F4F17C7222"><title>See Also</title> <p> <xref href="GUID-DB3A6401-D25E-57E7-A8BF-3B9E0DE3B1D6.dita">Flexible
Memory Model Tutorial</xref>  </p> </section>
</conbody></concept>