Symbian3/PDK/Source/GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C.dita
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
--- a/Symbian3/PDK/Source/GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C.dita	Thu Mar 11 15:24:26 2010 +0000
+++ b/Symbian3/PDK/Source/GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C.dita	Thu Mar 11 18:02:22 2010 +0000
@@ -1,14 +1,14 @@
-<?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 xml:lang="en" id="GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C"><title>Heaps</title><shortdesc>Each thread has a chunk which contains that thread's program stack. For the main thread of a process, this chunk also contains the thread's heap. A program's request for memory is allocated from this heap. For example, a code fragment such as: </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><codeblock id="GUID-ED3A8BC9-7601-5035-B422-ED80E5504867" xml:space="preserve">CArrayFixFlat&lt;...&gt;* fixflat;
-...
+<?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 xml:lang="en" id="GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C"><title>Heaps</title><shortdesc>Each thread has a chunk which contains that thread's program stack. For the main thread of a process, this chunk also contains the thread's heap. A program's request for memory is allocated from this heap. For example, a code fragment such as: </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><codeblock id="GUID-ED3A8BC9-7601-5035-B422-ED80E5504867" xml:space="preserve">CArrayFixFlat&lt;...&gt;* fixflat;
+...
 fixflat = new (ELeave) CArrayFixFlat&lt;...&gt;(3);</codeblock> <p>causes a portion of memory to be allocated from the heap and its address returned to the caller. Memory from the heap must be explicitly requested and, importantly, explicitly freed by the program. </p> <p>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. </p> <p>When a new thread is created, either: </p> <ul><li id="GUID-C915A4D8-70D9-55B4-A16F-9729B1F8D94B"><p>a new heap is created for it </p> </li> <li id="GUID-E72B8DF5-CB52-5333-9D3E-EFDBAFE6CB59"><p>it uses the creating thread's heap </p> </li> <li id="GUID-20C6F186-6EF6-511E-9291-3273CA930B5D"><p>it uses an explicitly referenced heap. </p> </li> </ul> <p>A thread gets the handle to its heap by calling <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-42AC433D-1C9C-3AC6-8640-EB1A7BA876B5"><apiname>User::Heap()</apiname></xref>. </p> </conbody></concept>
\ No newline at end of file