|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
23 #ifndef ELM_ALLOC_STACKALLOCATOR_H_
24 #define ELM_ALLOC_STACKALLOCATOR_H_
26 #include <elm/types.h>
27 #include <elm/assert.h>
28 #include <elm/alloc/DefaultAllocator.h>
29 #include <elm/PreIterator.h>
41 inline void free(
void *block) { }
66 inline bool ended(
void)
const {
return !cur; }
virtual void * chunkFilled(t::size size)
Definition: alloc_StackAllocator.cpp:92
chunk_t * item(void) const
Definition: StackAllocator.h:67
Definition: StackAllocator.h:61
char buffer[0]
Definition: StackAllocator.h:58
T * allocate(int n=1)
Definition: StackAllocator.h:51
void free(void *block)
Definition: StackAllocator.h:41
Definition: StackAllocator.h:34
void * allocate()
Definition: StackAllocator.h:40
Definition: StackAllocator.h:56
ChunkIter & operator=(const ChunkIter &i)
Definition: StackAllocator.h:65
static StackAllocator DEFAULT
Definition: StackAllocator.h:36
uint64 size
Definition: arch.h:35
bool ended(void) const
Definition: StackAllocator.h:66
void clear(void)
Definition: alloc_StackAllocator.cpp:109
char * mark_t
Definition: StackAllocator.h:45
mark_t mark(void)
Definition: alloc_StackAllocator.cpp:142
struct elm::StackAllocator::chunk_t chunk_t
void newChunk(void)
Definition: alloc_StackAllocator.cpp:121
t::size chunkSize(void) const
Definition: StackAllocator.h:73
ChunkIter(const ChunkIter &i)
Definition: StackAllocator.h:64
virtual ~StackAllocator(void)
Definition: alloc_StackAllocator.cpp:63
void release(mark_t mark)
Definition: alloc_StackAllocator.cpp:151
struct chunk_t * next
Definition: StackAllocator.h:57
void next(void)
Definition: StackAllocator.h:68
ChunkIter(const StackAllocator &a)
Definition: StackAllocator.h:63
StackAllocator(t::size size=4096)
Definition: alloc_StackAllocator.cpp:55