21 #ifndef ELM_ALLOC_BLOCK_ALLOCATOR_WITH_GC
22 #define ELM_ALLOC_BLOCK_ALLOCATOR_WITH_GC
24 #include <elm/alloc/DefaultAllocator.h>
25 #include <elm/genstruct/Vector.h>
26 #include <elm/util/BitVector.h>
45 void free(
void *block);
51 virtual void endGC(
void);
77 #endif // ELM_ALLOC_BLOCK_ALLOCATOR_WITH_GC
BlockAllocatorWithGC(t::size chunk_size=1<< 20)
Definition: BlockAllocatorWithGC.h:68
virtual void beginGC(void)
Definition: alloc_BlockAllocatorWithGC.cpp:186
int freeCount(void) const
Definition: BlockAllocatorWithGC.h:39
void * allocate(void)
Definition: alloc_BlockAllocatorWithGC.cpp:68
virtual void collect(void)=0
uint32 size
Definition: int.h:41
virtual ~AbstractBlockAllocatorWithGC(void)
Definition: alloc_BlockAllocatorWithGC.cpp:47
Definition: BitVector.h:33
bool mark(void *ptr)
Definition: alloc_BlockAllocatorWithGC.cpp:159
Definition: DefaultAllocator.h:31
virtual void endGC(void)
Definition: alloc_BlockAllocatorWithGC.cpp:195
int free_cnt
Definition: BlockAllocatorWithGC.h:55
struct elm::AbstractBlockAllocatorWithGC::free_t free_t
t::size blockSize(void) const
Definition: BlockAllocatorWithGC.h:37
int totalCount(void) const
Definition: alloc_BlockAllocatorWithGC.cpp:203
free_t * free_list
Definition: BlockAllocatorWithGC.h:54
uint8_t uint8
Definition: int.h:31
Definition: BlockAllocatorWithGC.h:31
T * allocate(void)
Definition: BlockAllocatorWithGC.h:69
void collectGarbage(void)
Definition: alloc_BlockAllocatorWithGC.cpp:115
int usedCount(void) const
Definition: BlockAllocatorWithGC.h:41
bool mark(T *b)
Definition: BlockAllocatorWithGC.h:72
free_t * next
Definition: BlockAllocatorWithGC.h:53
AbstractBlockAllocatorWithGC(t::size block_size, t::size chunk_size=1<< 20)
Definition: alloc_BlockAllocatorWithGC.cpp:37
t::size chunkSize(void) const
Definition: BlockAllocatorWithGC.h:38
Definition: BlockAllocatorWithGC.h:53
Definition: BlockAllocatorWithGC.h:66
void free(void *block)
Definition: alloc_BlockAllocatorWithGC.cpp:108