Lines Matching refs: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
80 * Create a new regional.
81 * @return: newly allocated regional.
83 struct regional* regional_create(void);
88 * @return: newly allocated regional.
90 struct regional* regional_create_custom(size_t size);
93 * Free all memory associated with regional. Only keeps the first block with
94 * the regional inside it.
97 void regional_free_all(struct regional *r);
100 * Destroy regional. All memory associated with regional is freed as if
101 * regional_free_all was called, as well as destroying the regional struct.
104 void regional_destroy(struct regional *r);
107 * Allocate size bytes of memory inside regional. The memory is
113 void *regional_alloc(struct regional *r, size_t size);
116 * Allocate size bytes of memory inside regional and copy INIT into it.
124 void *regional_alloc_init(struct regional* r, const void *init, size_t size);
127 * Allocate size bytes of memory inside regional that are initialized to
134 void *regional_alloc_zero(struct regional *r, size_t size);
137 * Duplicate string and allocate the result in regional.
142 char *regional_strdup(struct regional *r, const char *string);
144 /** Debug print regional statistics to log */
145 void regional_log_stats(struct regional *r);
148 size_t regional_get_mem(struct regional* r);