Adaptation/GUID-4862EA2E-6BFE-5E11-B527-7EBA94BB0EA2.dita
changeset 15 307f4279f433
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Adaptation/GUID-4862EA2E-6BFE-5E11-B527-7EBA94BB0EA2.dita	Fri Oct 15 14:32:18 2010 +0100
@@ -0,0 +1,116 @@
+<?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 task
+  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task id="GUID-4862EA2E-6BFE-5E11-B527-7EBA94BB0EA2" xml:lang="en"><title>OBY Tutorial </title><shortdesc>Describes the new demand paging keywords available to the
+OBY. file. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context id="GUID-E46B9321-49E9-545D-B38B-CF2BB7AD8E19"><p><b>Introduction</b></p><p>The new keywords that are available in the OBY file are used
+to specify whether an object is paged, and if so what kind of demand
+paging it supports. </p><p>          With the addition of writable
+data paging, the list of paging modifiers is shown below:   </p><p><b>Procedure</b></p><p>          With the addition of writable data
+paging, the list of paging modifiers is shown below:   </p><table id="GUID-1DB56A5D-823B-4E26-80A3-C1362B309773">
+<tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
+<tbody>
+<row>
+<entry><p><b>Keyword</b></p></entry>
+<entry><p><b>Behaviour on Symbian platform</b></p></entry>
+</row>
+<row>
+<entry><p>paged</p></entry>
+<entry><p> Enables code and data paging  </p></entry>
+</row>
+<row>
+<entry><p>unpaged</p></entry>
+<entry><p> Disables code and data paging</p></entry>
+</row>
+<row>
+<entry><p>pagedcode</p></entry>
+<entry><p> Enables code paging</p></entry>
+</row>
+<row>
+<entry><p> unpagedcode</p></entry>
+<entry><p>Disables code paging</p></entry>
+</row>
+<row>
+<entry><p>pageddata</p></entry>
+<entry><p>Enables data paging</p></entry>
+</row>
+<row>
+<entry><p>unpageddata</p></entry>
+<entry><p> Disables data paging</p></entry>
+</row>
+</tbody>
+</tgroup>
+</table><p> These modifiers appear in OBY files at the end of statements
+relating to user-side ROM objects i.e. <codeph>'file=', 'dll=', 'data='
+and 'secondary='</codeph>statements). For example:  </p><codeblock xml:space="preserve">file=ABI_DIR\DEBUG_DIR\MyLibrary.dll \sys\bin\MyLibrary.dll unpaged</codeblock><p>The data paging keywords only make sense when applied to executable
+binary files.   </p><p>For an executable file, the use of one of the
+above keywords in the oby file will override the paging settings in
+the mmp file. However this will not be true, if the <codeph>pagingoverride</codeph>, <codeph>codepagingoverride</codeph> or <codeph>datapagingoverride</codeph> keywords are used in the MMP file, in the case of <codeph>nopaging</codeph>  or <codeph>alwayspage</codeph> .</p> </context>
+<result id="GUID-EA5E0DDD-4354-5DD4-89D2-462A0B0E8A81"><p>Executing
+the buildrom command builds with no errors or warnings. </p> </result>
+<example id="GUID-ED6203BD-3890-5F27-8BAA-AFE3B0FAA518"><title>OBY
+file example</title> <p>An example of an OBY file that uses the new
+demand paging keywords is given below: </p> <codeblock id="GUID-84F82A9B-8F29-5A58-A9C3-7DEB19D5B9ED" xml:space="preserve">// 
+// MyDPConfig.oby 
+//
+// The section below, is used to specify if XIP ROM paging is implemented.  
+#if !defined PAGED_ROM 
+#define PAGED_ROM 
+#endif
+ 
+// The sections below, is used to specify if code paging is implemented.
+#if !defined USE_CODE_PAGING 
+// Comment out the next line if code paging is wanted 
+#define USE_CODE_PAGING 
+#endif
+ 
+#if !defined CODE_PAGING_FROM_ROFS 
+// Comment out the next line if code paging from primary rofs is wanted 
+#define CODE_PAGING_FROM_ROFS 
+#endif 
+
+// The section below, is used to configure the writable data paging and to specify what the 
+// default paging behaviour is to be. 
+ROM_IMAGE[0] { 
+pagedrom 
+compress 
+//                 Min   Max   Young/Old 
+//                 Live  Live  Page 
+//                 Pages Pages Ratio 
+demandpagingconfig 256   512   3 
+pagingoverride defaultpaged
+
+// This section specifies what the default paging behaviour is to be for code paging. 
+#if defined USE_CODE_PAGING &amp;&amp; !defined USE_DATA_PAGING 
+codepagingpolicy defaultpaged 
+#endif 
+
+#if defined USE_DATA_PAGING 
+#if defined USE_CODE_PAGING 
+codepagingpolicy defaultpaged 
+#endif 
+
+datapagingpolicy defaultpaged 
+#endif 
+}
+
+#if defined CODE_PAGING_FROM_ROFS || defined USE_DATA_PAGING 
+ROM_IMAGE[1] { 
+pagingoverride defaultpaged 
+}
+#endif 
+
+// Now specify the files to be used
+file=ABI_DIR\DEBUG_DIR\MyLibrary.dll \sys\bin\MyLibrary.dll unpaged
+</codeblock> </example>
+<postreq id="GUID-5000ED29-DB7E-4855-965C-6B0C335A40C2"><p>The next step is to <xref href="GUID-6B9041F7-79A6-5CCA-9B4D-B8EF377FD378.dita">Build the writable
+data paging ROM</xref>  </p> </postreq>
+</taskbody></task>
\ No newline at end of file