22 #include <spot/misc/common.hh> 24 #if SPOT_DEBUG && defined(HAVE_VALGRIND_MEMCHECK_H) 25 #include <valgrind/memcheck.h> 42 chunk_* prev = chunklist_->prev;
43 ::operator
delete(chunklist_);
52 block_* f = freelist_;
56 #if SPOT_DEBUG && defined(HAVE_VALGRIND_MEMCHECK_H) 57 VALGRIND_MALLOCLIKE_BLOCK(f, size_, 0,
false);
60 VALGRIND_MAKE_MEM_DEFINED(f,
sizeof(block_*));
70 if (free_start_ + size_ > free_end_)
73 void* res = free_start_;
75 #if SPOT_DEBUG && defined(HAVE_VALGRIND_MEMCHECK_H) 76 VALGRIND_MALLOCLIKE_BLOCK(res, size_, 0,
false);
91 block_* b =
reinterpret_cast<block_*
>(ptr);
94 #if SPOT_DEBUG && defined(HAVE_VALGRIND_MEMCHECK_H) 95 VALGRIND_FREELIKE_BLOCK(ptr, 0);
103 struct block_ { block_* next; }* freelist_;
107 union chunk_ { chunk_* prev;
char data_[1]; }* chunklist_;
Definition: automata.hh:26
void * allocate()
Allocate size bytes of memory.
Definition: fixpool.hh:50
~fixed_size_pool()
Free any memory allocated by this pool.
Definition: fixpool.hh:38
void deallocate(void *ptr)
Recycle size bytes of memory.
Definition: fixpool.hh:88
A fixed-size memory pool implementation.
Definition: fixpool.hh:31