1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
<package name="freetypelaz">
<!--
====================================================================
TTMemory
====================================================================
-->
<module name="TTMemory">
<short>Memory management specification.</short>
<descr>
<p>
Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg.
</p>
<p>
This file is part of the FreeType project, and may only be used modified and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify or distribute this file you indicate that you have read the license and understand and accept it fully.
</p>
<p>
Differences between 2.1 and 2.0:
</p>
<ul>
<li>Added a memory mutex to make the component thread-safe.</li>
</ul>
<p>
Differences between 2.0 and 1.1:
</p>
<ul>
<li>The growing heap was completely removed in version 2.0,</li>
<li>
The support for small mini-heaps may be re-introduced later to allow the storage of several consecutive arrays in one single block.
</li>
</ul>
<remark>
<p>IMPORTANT NOTICE :</p>
<p>
The Alloc and Free functions mimic their C equivalent, however, some points must be noticed:
</p>
<ul>
<li>
Both functions return a boolean. As usual, True indicates success, while False indicates failure.
</li>
<li>
The Alloc function puts a small header on front of each allocated block. The header contains a magic cookie and the size of the allocated block. This allows calls to Free without passing a block size as an argument, and thus reduces the risks of memory leaks.
</li>
<li>
It is possible to call Free with a nil pointer, in which case nothing happens, and the result is set to True (success).
</li>
</ul>
<p>
The pointer is set to nil after a call to Free in all cases.
This is done to clear the destructors code, allowing:
</p>
<code>
if (pointer) then
begin
Free(pointer);
pointer := nil;
end;
</code>
<p>To be replaced by a single line:</p>
<code>
Free(pointer);
</code>
</remark>
</descr>
<!-- unresolved external references -->
<element name="TTTypes"/>
<element name="TMarkRecord">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMarkRecord.Magic">
<short/>
</element>
<element name="TMarkRecord.Top">
<short/>
</element>
<element name="Font_Pool_Allocated">
<short/>
<descr/>
<seealso/>
</element>
<element name="Alloc">
<short/>
<descr>
<p>
Allocates a new memory block in the current heap of <var>size</var> bytes. Returns failure if no memory is left in the heap.
</p>
</descr>
<seealso/>
</element>
<element name="Alloc.Result">
<short/>
</element>
<element name="Alloc.P">
<short/>
</element>
<element name="Alloc.size">
<short/>
</element>
<element name="Free">
<short/>
<descr>
<p>
Releases a block previously allocated through <var>Alloc</var>. Returns True (success) if P is Nil before the call. Sets P to nil before exit.
</p>
</descr>
<seealso/>
</element>
<element name="Free.P">
<short/>
</element>
<element name="TTMemory_Init">
<short/>
<descr/>
<seealso/>
</element>
<element name="TTMemory_Init.Result">
<short/>
</element>
<element name="TTMemory_Done">
<short/>
<descr/>
<seealso/>
</element>
</module>
<!-- TTMemory -->
</package>
</fpdoc-descriptions>
|