~jaypipes/drizzle/subscriber-plugin

« back to all changes in this revision

Viewing changes to drizzled/memory/root.h

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
/*
17
 
   Data structures for mysys/my_alloc.c (root memory allocator)
18
 
*/
19
16
 
20
 
#ifndef MYSYS_MY_ALLOC_H
21
 
#define MYSYS_MY_ALLOC_H
 
17
#ifndef DRIZZLED_MEMORY_ROOT_H
 
18
#define DRIZZLED_MEMORY_ROOT_H
22
19
 
23
20
#include <stddef.h>
 
21
 
24
22
#include <drizzled/definitions.h>
25
23
 
26
24
#if defined(__cplusplus)
27
25
extern "C" {
28
26
#endif
29
27
 
 
28
#define MY_KEEP_PREALLOC        1
 
29
#define MY_MARK_BLOCKS_FREE     2  /* move used to free list and reuse them */
 
30
 
 
31
#define alloc_root_inited(A) ((A)->min_malloc != 0)
 
32
#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
30
33
#define ALLOC_MAX_BLOCK_TO_DROP                 4096
31
34
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP       10
32
35
 
71
74
#if defined(__cplusplus)
72
75
}
73
76
#endif
74
 
#endif /* MYSYS_MY_ALLOC_H */
 
77
#endif /* DRIZZLED_MEMORY_ROOT_H */