Lines Matching defs:mem
84 static AllocationEntry* to_header(void* mem) {
85 return reinterpret_cast<AllocationEntry*>(mem) - 1;
224 extern "C" void fill_free(void* mem) {
225 size_t bytes = dlmalloc_usable_size(mem);
226 memset(mem, CHK_FILL_FREE, bytes);
227 dlfree(mem);
230 extern "C" void* fill_realloc(void* mem, size_t bytes) {
232 if (mem == NULL) {
236 size_t old_size = dlmalloc_usable_size(mem);
238 memcpy(buffer, mem, size);
239 fill_free(mem);
291 extern "C" void leak_free(void* mem) {
292 if (mem != NULL) {
296 AllocationEntry* header = to_header(mem);
300 if (reinterpret_cast<void**>(mem)[-1] == MEMALIGN_GUARD) {
301 mem = reinterpret_cast<void**>(mem)[-2];
302 header = to_header(mem);