Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 6282078ae76a671f49c6af38c67b1a07 > files > 557

kdelibs-devel-2.2.2-49.2mdk.i586.rpm

<HTML>
<HEAD>
<TITLE>class KZoneAllocator</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class KZoneAllocator</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">
 Memory allocator for large groups of small objects. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="kallocator_h.html">kallocator.h</A>&gt;</code></TD></TR>
<TR><TH><A HREF="full-list-KZoneAllocator.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref1">KZoneAllocator</A></b> (long _blockSize = 128*1024) 
</LI>
<LI>&nbsp;<b><A HREF="#ref2">~KZoneAllocator</A></b> () 
</LI>
<LI>void* &nbsp;<b><A HREF="#ref3">allocate</A></b> (size_t _size) 
</LI>
</ul><h4>Protected Members</h4><ul><LI>long <b><A HREF="#ref4">blockSize</A></b></LI>
<LI>QList<char> <b><A HREF="#ref5">memoryBlocks</A></b></LI>
<LI>char *<b><A HREF="#ref6">currentBlock</A></b></LI>
<LI>long <b><A HREF="#ref7">blockOffset</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 Memory allocator for large groups of small objects.
 This should be used for large groups of objects that are created and
 destroyed together. When used carefully for this purpose it is faster
 and more memory efficient than malloc.
</p>
<A NAME="KZoneAllocator"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>KZoneAllocator</strong> (long _blockSize = 128*1024)
<br></td><td align="right"><h3><strong>KZoneAllocator</strong></h3></td></tr></table><p></p><p>
 Create a ZoneAllocator 
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>_blockSize</i></TD><TD align="left" valign="top">Size in bytes of the blocks requested from malloc. 
     </TD></TR>
</TABLE></P>
<A NAME="~KZoneAllocator"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>~KZoneAllocator</strong> ()
<br></td><td align="right"><h3><strong>~KZoneAllocator</strong></h3></td></tr></table><p></p><p>
 Destruct the ZoneAllocator and free all memory allocated by it.
     </p>
<A NAME="allocate"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void* &nbsp;<strong>allocate</strong> (size_t _size)
<br></td><td align="right"><h3><strong>allocate</strong></h3></td></tr></table><p></p><p>
 Allocate a memory block.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>_size</i></TD><TD align="left" valign="top">Size in bytes of the memory block. Memory is not alligned!
     </TD></TR>
</TABLE></P>
<A NAME="blockSize"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>long  <strong>blockSize</strong>
</td><td align="right"><h3><strong>blockSize</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="memoryBlocks"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qlist.html">QList</A><char>  <strong>memoryBlocks</strong>
</td><td align="right"><h3><strong>memoryBlocks</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="currentBlock"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>char * <strong>currentBlock</strong>
</td><td align="right"><h3><strong>currentBlock</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="blockOffset"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>long  <strong>blockOffset</strong>
</td><td align="right"><h3><strong>blockOffset</strong></h3></td></tr></table><p> <small>[protected]</small></p><HR><UL><LI><i>Version</i>: $Id: kallocator.h,v 1.3 2000/03/06 18:10:42 granroth Exp $
 </LI><LI><i>Author</i>: Waldo Bastian <bastian@kde.org>
</LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:08:56 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>