Changeset 57
Legend:
- Unmodified
- Added
- Removed
-
DOV/bibl.xml
r54 r57 1 <bibliography xmlns="http://docbook.org/ns/docbook">1 <bibliography> 2 2 <title>References</title> 3 3 -
DOV/book.xml
r54 r57 46 46 47 47 <legalnotice> 48 <para>This work is licensed under the Creative Commons Attribution License. To 49 view a copy of this license, visit <ulink 50 url="http://creativecommons.org/licenses/by/2.0/"/> or send a 51 letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 52 94305, USA.</para> 48 <para>This work is licensed under the Creative Commons 49 Attribution-NonCommercial-NoDerivs 2.5 License. To view a copy of this 50 license, visit <ulink 51 url="http://creativecommons.org/licenses/by-nc-nd/2.5/"/> or 52 send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, 53 California 94305, USA.</para> 53 54 </legalnotice> 54 55 -
DOV/ch03.xml
r54 r57 1 1 <?xml version='1.0'?> 2 <!DOCTYPE prefacePUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd">2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd"> 3 3 <chapter id="dov.vom"> 4 4 … … 44 44 which is encapsulated and come with object methods to work with 45 45 them. For example one doesn't copy a file by using a 46 filemanager or the desktop application and calling some 47 <function>copy()</function> API of the operating system. Instead48 a method on the file object is invoked and the file object49 handles thecopying on itself.</para>46 filemanager or the desktop application and calling some <function> 47 copy()</function> API of the operating system. Instead a method 48 on the file object is invoked and the file object handles the 49 copying on itself.</para> 50 50 51 51 <para>Every object is an instance of a class which is registered … … 238 238 <title>Memory Management</title> 239 239 240 <para>Using <function>wpAllocMem()</function> and 241 <function>wpFreeMem()</function> allocated memory is tracked in242 an inuse list. Whenever an object is deleted or goes dormant this243 list is scanned by the system and memory still allocated will be244 freed automatically. Nevertheless memory not in use anymore245 should be freed by the programmer as usual because the desktop246 does not include a garbage collector. The inuse list should be247 consideredas a kind of safety net.</para>240 <para>Using <function>wpAllocMem()</function> and <function> 241 wpFreeMem()</function> allocated memory is tracked in an inuse 242 list. Whenever an object is deleted or goes dormant this list is 243 scanned by the system and memory still allocated will be freed 244 automatically. Nevertheless memory not in use anymore should be 245 freed by the programmer as usual because the desktop does not 246 include a garbage collector. The inuse list should be considered 247 as a kind of safety net.</para> 248 248 249 249 <warning> 250 250 251 <para>While the usual memory function like 252 <function>malloc()</function>, <function>g_alloc()</function>,253 <function>SOMMAlloc()</function> are available to desktop254 developers it is strongly adviced to only use255 <function>wpAllocMem()</function> and256 <function>wpFreeMem()</function>.</para>251 <para>While the usual memory function like <function> 252 malloc()</function>, <function>g_alloc()</function>, <function> 253 SOMMAlloc()</function> are available to desktop developers it 254 is strongly adviced to only use <function> 255 wpAllocMem()</function> and <function> 256 wpFreeMem()</function>.</para> 257 257 258 258 </warning> … … 262 262 <listitem> 263 263 264 <title>Memory allocation with 265 <function>wpAllocMem()</function></title> 266 264 <bridgehead>Memory allocation with <function> 265 wpAllocMem()</function></bridgehead> 267 266 <para>A programmer asks for memory using</para> 268 267 269 <funcsynopsis><funcprototype><funcdef>int 270 <function>wpAllocMem</function></funcdef> <paramdef>WPObject271 <parameter>somSelf</parameter></paramdef> <paramdef>ULONG272 <parameter>cbBytes</parameter></paramdef>273 <param def><parameter>...</parameter></paramdef></funcprototype></funcsynopsis>268 <funcsynopsis><funcprototype><funcdef>int <function> 269 wpAllocMem</function></funcdef><paramdef>WPObject <parameter> 270 somSelf</parameter></paramdef><paramdef>ULONG <parameter> 271 cbBytes</parameter></paramdef><paramdef> 272 <parameter>...</parameter></paramdef></funcprototype></funcsynopsis> 274 273 <para>This method is introduced by the 275 274 <classname>WPObject</classname> class.</para> … … 305 304 variables. The inuse list is such a critical resource so 306 305 <function>wpAddToObjUseList()</function> tries to aquire the 307 objects semaphor using 308 <function>wpRequestObjectSem()</function>.</para>306 objects semaphor using <function> 307 wpRequestObjectSem()</function>.</para> 309 308 310 309 <warning> … … 319 318 <listitem> 320 319 321 <title>Freeing memory with 322 <function>wpFreeMem()</function></title> 323 324 <para>Memory is freed using 325 <synopsis>wpFreeMem()</synopsis></para> 320 <bridgehead>Freeing memory with <function> 321 wpFreeMem()</function></bridgehead> 322 <para>Memory is freed using <synopsis> 323 wpFreeMem()</synopsis></para> 326 324 327 325 <para>This method introduced by … … 330 328 block (see the section about memory allocation). Using a 331 329 pointer to the USEITEM the memory is removed from the objects 332 inuse list using 333 <function>wpDeleteFromObjUseList()</function>.</para>330 inuse list using <function> 331 wpDeleteFromObjUseList()</function>.</para> 334 332 335 333 <para>Be aware that this method tries to aquire the object
Note:
See TracChangeset
for help on using the changeset viewer.