<?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>
<file>ttmemory.pas</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, <b>True</b> indicates success, 
while <b>False</b> 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 <b>True</b> (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 
<b>True</b> (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>
