23#include <drizzled/common_fwd.h>
25#include <drizzled/util/data_ref.h>
40static const int KEEP_PREALLOC= 1;
42static const int MARK_BLOCKS_FREE= 2;
70 Root(
size_t block_size_arg)
74 block_size= block_size_arg - memory::ROOT_MIN_BLOCK_SIZE;
109 unsigned char*
alloc(
size_t Size);
111 void*
memdup(
const void*,
size_t);
112 char*
strdup(
const char*);
114 char*
strdup(
const char*,
size_t);
118 bool alloc_root_inited()
const
122 void free_root(myf MyFLAGS);
123 void* multi_alloc(
int unused, ...);
125 void* calloc(
size_t size)
127 void* ptr= alloc(size);
128 memset(ptr, 0, size);
138 return root.alloc(size);
143 return root.alloc(size);
unsigned char * alloc(size_t Size)
Allocate a chunk of memory from the Root structure provided, obtaining more memory from the heap if n...
void * memdup(const void *, size_t)
Duplicate the provided block into memory allocated from within the specified Root.
unsigned int block_num
allocated blocks counter
unsigned int first_block_usage
void mark_blocks_free()
Mark all data in blocks free for reusage.
size_t block_size
initial block size
char * strdup(const char *)
Duplicate a null-terminated string into memory allocated from within the specified Root.
internal::UsedMemory * free
void reset_defaults(size_t block_size, size_t prealloc_size)
internal::UsedMemory * used
internal::UsedMemory * pre_alloc
void init(size_t block_size=ROOT_MIN_BLOCK_SIZE)
Initialize memory root.
TODO: Rename this file - func.h is stupid.
Visibility Control Macros.