Symbian3/PDK/Source/GUID-1824B323-AAA8-5403-A4CF-D1F530CBDAF5.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 14 578be2adaf3e
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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-1824B323-AAA8-5403-A4CF-D1F530CBDAF5" xml:lang="en"><title>Introduction
to Space Reclamation and Compaction</title><shortdesc>When a stream is replaced or deleted, the space it occupies is
not immediately available for re-use by other streams. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>There are two things you can do about this:</p>
<ul>
<li id="GUID-4DDE58C7-78C8-5356-A7EA-FA1D24BFE327"><p>reclaim unused space;
this makes it available for re-use by the store</p> </li>
<li id="GUID-FBC8264B-B808-57D3-91FA-60A5C5074226"><p>compact; this makes
unused space available for re-use by the relevant system pool; for example,
the filing system in the case of file-based stores.</p> </li>
</ul>
<p>Space reclamation and compaction are only supported by the permanent file
store, <codeph>CPermanentFileStore</codeph>, and are not supported by embedded
or direct file stores. Because permanent file stores must maintain their integrity,
even when a transaction fails, normal operations use a relatively conservative
approach to update these stores without overwriting old data. Therefore, applications
using permanent file stores must compact them regularly.</p>
<p>The task of both space reclamation and compaction can be approached in
one of two general ways:</p>
<ul>
<li id="GUID-4F10D740-C890-51AB-80A6-6DC76FFC39AA"><p>as a single, possibly
long-running, job</p> </li>
<li id="GUID-53D117F5-809C-5AB2-97E8-5AD087ABB434"><p>incrementally, as a
series of small steps, running either synchronously or asynchronously.</p> </li>
</ul>
</conbody><related-links>
<link href="GUID-C9D8D913-C65F-5A69-A606-30F59BFB38E2.dita"><linktext>File Stores</linktext>
</link>
</related-links></concept>