sgdk
pool.h
Go to the documentation of this file.
00001 
00037 #ifndef _POOL_H_
00038 #define _POOL_H_
00039 
00040 
00056 typedef struct
00057 {
00058     void* bank;
00059     void** allocStack;
00060     void** free;
00061     u16 objectSize;
00062     u16 size;
00063 } Pool;
00064 
00065 
00080 Pool* POOL_create(u16 size, u16 objectSize);
00090 void POOL_destroy(Pool* pool);
00091 
00101 void POOL_reset(Pool* pool, bool clear);
00102 
00114 void* POOL_allocate(Pool* pool);
00129 void POOL_release(Pool* pool, void* object, bool maintainCoherency);
00130 
00138 u16 POOL_getFree(Pool* pool);
00146 u16 POOL_getNumAllocated(Pool* pool);
00147 
00157 void** POOL_getFirst(Pool* pool);
00158 
00168 s16 POOL_find(Pool* pool, void* object);
00169 
00170 
00171 #endif // _POOL_H_
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines