Lines Matching refs:alloc

2  * util/alloc.h - memory allocation service. 
101 * Init alloc (zeroes the struct).
102 * @param alloc: this parameter is allocated by the caller.
104 * Pass this argument NULL to init the toplevel alloc structure.
107 void alloc_init(struct alloc_cache* alloc, struct alloc_cache* super,
111 * Free the alloc. Pushes all the cached items into the super structure.
112 * Or deletes them if alloc->super is NULL.
113 * Does not free the alloc struct itself (it was also allocated by caller).
114 * @param alloc: is almost zeroed on exit (except some stats).
116 void alloc_clear(struct alloc_cache* alloc);
122 * @param alloc: the special allocs are freed.
124 void alloc_clear_special(struct alloc_cache* alloc);
128 * @param alloc: where to alloc it.
132 alloc_special_type* alloc_special_obtain(struct alloc_cache* alloc);
137 * @param alloc: where to alloc it.
140 void alloc_special_release(struct alloc_cache* alloc, alloc_special_type* mem);
145 * @param alloc: the alloc cache
148 uint64_t alloc_get_id(struct alloc_cache* alloc);
151 * Get memory size of alloc cache, alloc structure including special types.
152 * @param alloc: on what alloc.
155 size_t alloc_get_mem(struct alloc_cache* alloc);
159 * @param alloc: on what alloc.
161 void alloc_stats(struct alloc_cache* alloc);
165 * @param alloc: where to alloc it.
166 * @return regional for use or NULL on alloc failure.
168 struct regional* alloc_reg_obtain(struct alloc_cache* alloc);
171 * Put regional for query states back into alloc cache.
172 * @param alloc: where to alloc it.
175 void alloc_reg_release(struct alloc_cache* alloc, struct regional* r);
180 * @param alloc: the alloc
184 void alloc_set_id_cleanup(struct alloc_cache* alloc, void (*cleanup)(void*),