Lines Matching defs:regional

2  * regional.h -- region based memory allocator.
46 * o allocs the regional struct inside the first block.
47 * o can take a block to create regional from.
55 * the regional* is the first block*.
57 * and so does the regional struct, which is the first block.
59 struct regional
79 /** padding for sizeof8 alignment of sizeof(struct regional)
85 * Create a new regional.
86 * @return: newly allocated regional.
88 struct regional* regional_create(void);
93 * @return: newly allocated regional.
95 struct regional* regional_create_custom(size_t size);
101 * @return: newly allocated regional.
103 struct regional* regional_create_nochunk(size_t size);
106 * Free all memory associated with regional. Only keeps the first block with
107 * the regional inside it.
110 void regional_free_all(struct regional *r);
113 * Destroy regional. All memory associated with regional is freed as if
114 * regional_free_all was called, as well as destroying the regional struct.
117 void regional_destroy(struct regional *r);
120 * Allocate size bytes of memory inside regional. The memory is
126 void *regional_alloc(struct regional *r, size_t size);
129 * Allocate size bytes of memory inside regional and copy INIT into it.
137 void *regional_alloc_init(struct regional* r, const void *init, size_t size);
140 * Allocate size bytes of memory inside regional that are initialized to
147 void *regional_alloc_zero(struct regional *r, size_t size);
150 * Duplicate string and allocate the result in regional.
155 char *regional_strdup(struct regional *r, const char *string);
157 /** Debug print regional statistics to log */
158 void regional_log_stats(struct regional *r);
161 size_t regional_get_mem(struct regional* r);