Rudiments
/home/dmuse/src/rudiments/include/rudiments/memorypool.h
00001 // Copyright (c) 2002 David Muse
00002 // See the COPYING file for more information.
00003 
00004 #ifndef RUDIMENTS_MEMORYPOOL_H
00005 #define RUDIMENTS_MEMORYPOOL_H
00006 
00007 #include <rudiments/private/memorypoolincludes.h>
00008 
00009 #ifdef RUDIMENTS_NAMESPACE
00010 namespace rudiments {
00011 #endif
00012 
00013 class memorypoolprivate;
00014 
00022 class RUDIMENTS_DLLSPEC memorypool {
00023         public:
00034                 memorypool(size_t initialsize,
00035                                 size_t increment,
00036                                 size_t resizeinterval);
00037 
00039                 ~memorypool();
00040 
00044                 unsigned char   *malloc(size_t size);
00045 
00050                 unsigned char   *calloc(size_t size);
00051 
00054                 void    free();
00055 
00057                 void    print();
00058 
00059         #include <rudiments/private/memorypool.h>
00060 };
00061 
00062 #ifdef RUDIMENTS_NAMESPACE
00063 }
00064 #endif
00065 
00066 #endif