diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C.dita --- a/Symbian3/PDK/Source/GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-911CD800-2D1B-5D7B-A67C-66E01F91062C.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,39 +1,39 @@ - - - - - -HeapsThe main thread of a process has a memory chunk that contains the -thread's heap. A program's request for memory is allocated from this heap. -

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:

-CArrayFixFlat<...>* fixflat; -... -fixflat = new (ELeave) CArrayFixFlat<...>(3); -

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.

-

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.

-

When a new thread is created, either:

- -

A thread gets the handle to its heap by calling User::Heap().

-

See Address Space -and Process for more background on chunks and heaps.

+ + + + + +HeapsThe main thread of a process has a memory chunk that contains the +thread's heap. A program's request for memory is allocated from this heap. +

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:

+CArrayFixFlat<...>* fixflat; +... +fixflat = new (ELeave) CArrayFixFlat<...>(3); +

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.

+

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.

+

When a new thread is created, either:

+
    +
  • a new heap is created +for it

  • +
  • it uses the creating +thread's heap

  • +
  • it uses an explicitly +referenced heap.

  • +
+

A thread gets the handle to its heap by calling User::Heap().

+

See Address Space +and Process for more background on chunks and heaps.

\ No newline at end of file