20 #ifndef Minisat_Alloc_h
21 #define Minisat_Alloc_h
108 assert( (
void*)t >= (
void*)&
memory[0] && (
void*)t < (
void*)&
memory[
sz - 1] );
133 uint32_t prev_cap = cap;
134 while( cap < min_cap )
140 uint32_t delta = ((cap >> 1) + (cap >> 3) + 2) & (uint32_t)~1;
143 if( cap <= prev_cap )
149 memory = (T*)
xrealloc( memory,
sizeof(T) * cap );
157 capacity( sz + (uint32_t)size );
159 uint32_t prev_sz = sz;
160 sz += (uint32_t)size;
void moveTo(RegionAllocator &to)
const T * lea(Ref r) const
void capacity(uint32_t min_cap)
RegionAllocator(uint32_t start_cap=1024 *1024)
static void * xrealloc(void *ptr, size_t size)