Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

mempool.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  MEMPOOL.H                                                                           */
00003 /*                                                                                      */
00004 /*  Author: Charles Bloom                                                               */
00005 /*  Description: Fixed size block memory allocator interface                            */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 #ifndef MEMPOOL_H
00023 #define MEMPOOL_H
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 typedef struct MemPool MemPool;
00030 
00031 extern MemPool * MemPool_Create(int HunkLength,int NumHunks,int AutoExtendNumItems);
00032 extern int MemPool_Extend(MemPool * Pool,int NumHunks);
00033 extern void MemPool_Destroy(MemPool ** pPool);
00034 extern void MemPool_Reset(MemPool * Pool);
00035 extern void * MemPool_GetHunk(MemPool * Pool);
00036 extern int MemPool_FreeHunk(MemPool * Pool,void *Hunk);
00037 
00038  /* NOTEZ: MemPool_Get clears the memory block to zeros*/
00039 
00040 #ifdef _DEBUG
00041 extern int MemPool_IsValid(MemPool * Pool);
00042 #endif
00043 
00044 #ifdef __cplusplus
00045 }
00046 #endif
00047 
00048 #endif /*CRB_MEMPOOL_H*/

Generated on Tue Sep 30 12:36:00 2003 for GTestAndEngine by doxygen 1.3.2