40 #include "glimports.h"
49 Pool::Pool(
int _buffersize,
int initpoolsize,
const char *n )
51 if((
unsigned)_buffersize <
sizeof(
Buffer))
52 buffersize =
sizeof(
Buffer);
54 buffersize = _buffersize;
55 initsize = initpoolsize * buffersize;
72 assert( (
this != 0) && (magic == is_allocated) );
75 delete [] blocklist[--nextblock];
76 blocklist[nextblock] = 0;
82 void Pool::grow(
void )
84 assert( (
this != 0) && (magic == is_allocated) );
85 curblock =
new char[nextsize];
86 blocklist[nextblock++] = curblock;
99 assert( (
this != 0) && (magic == is_allocated) );
102 delete [] blocklist[--nextblock];
103 blocklist[nextblock] = 0;
108 if( nextsize > initsize )