Symbian3/SDK/Source/GUID-9452D60C-CD3E-570D-885F-F329264AB6F4.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-9452D60C-CD3E-570D-885F-F329264AB6F4" xml:lang="en"><title>The
array buffer</title><shortdesc>Describes the array buffer.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>All arrays have an array buffer. The implementation of this buffer and
the way it is used depend on the specific type of array.</p>
<p>In fixed length arrays and packed arrays the elements are contained within
the array buffer itself.</p>
<p>In variable length arrays each element is contained within its own heap
cell and the array buffer contains <i>pointers</i> to the elements.</p>
<p>Logically, an array buffer is linear but, physically, it can be organised
either as a flat buffer or a segmented buffer.</p>
<p>In general, you can choose between array classes which use a flat array
buffer and array classes which use a segmented array buffer. The choice depends
on how the array is to be used.</p>
<p>A segmented array buffer is implemented using a <codeph>CBufSeg</codeph> object.</p>
<p>A flat array buffer is implemented either:</p>
<ul>
<li id="GUID-F3E43492-AE56-5290-863D-15ED57DFCC6F"><p>directly by the array
as a piece of linear memory.</p> </li>
</ul>
<p>or</p>
<ul>
<li id="GUID-B7472961-5E2C-5ECA-864C-7B1FD547FD5F"><p>using a <codeph>CBufFlat</codeph> object.</p> </li>
</ul>
<p>The first has a simple and efficient implementation but has some restrictions
on the size of an array element and is limited to holding fixed length elements.
The second is a more general implementation but is only limited by the memory
available.</p>
<section id="GUID-72E6EC4A-DE51-44A9-A83D-16C3E33874E1"><title>See also</title> <p><xref href="GUID-112AAFA5-B4C9-5B62-A106-FB5097C13A0E.dita">Using
Dynamic Buffers</xref> </p> </section>
</conbody></concept>