Home | History | Annotate | Download | only in bionic

Lines Matching defs:malloc

31 // implementation of a debug malloc that can intercept all of the allocation
34 // library that is only loaded when the property "libc.debug.malloc.options"
50 #define Malloc(function) je_ ## function
54 Malloc(calloc),
55 Malloc(free),
56 Malloc(mallinfo),
57 Malloc(malloc),
58 Malloc(malloc_usable_size),
59 Malloc(memalign),
60 Malloc(posix_memalign),
62 Malloc(pvalloc),
64 Malloc(realloc),
66 Malloc(valloc),
68 Malloc(iterate),
69 Malloc(malloc_disable),
70 Malloc(malloc_enable),
71 Malloc(mallopt),
72 Malloc(aligned_alloc),
75 // Malloc hooks.
92 return Malloc(calloc)(n_elements, elem_size);
100 Malloc(free)(mem);
109 return Malloc(mallinfo)();
117 return Malloc(mallopt)(param, value);
120 extern "C" void* malloc(size_t bytes) {
121 auto _malloc = __libc_globals->malloc_dispatch.malloc;
125 return Malloc(malloc)(bytes);
133 return Malloc(malloc_usable_size)(mem);
141 return Malloc(memalign)(alignment, bytes);
149 return Malloc(posix_memalign)(memptr, alignment, size);
157 return Malloc(aligned_alloc)(alignment, size);
165 return Malloc(realloc)(old_mem, bytes);
174 return Malloc(pvalloc)(bytes);
182 return Malloc(valloc)(bytes);
186 // We implement malloc debugging only in libc.so, so the code below
204 static const char* DEBUG_PROPERTY_OPTIONS = "libc.debug.malloc.options";
205 static const char* DEBUG_PROPERTY_PROGRAM = "libc.debug.malloc.program";
290 if (!InitMallocFunction<MallocMalloc>(impl_handler, &table->malloc, prefix, "malloc")) {
337 // malloc leaks, but to avoid the standard streams showing up in
364 // Check to see if only a specific program should have debug malloc enabled.
423 // Prefer malloc debug since it existed first and is a more complete
424 // malloc interceptor than the hooks.
450 info_log("%s: malloc %s enabled", getprogname(), prefix);
481 return Malloc(iterate)(base, size, callback, arg);
484 // Disable calls to malloc so malloc_iterate gets a consistent view of
491 return Malloc(malloc_disable)();
494 // Re-enable calls to malloc after a previous call to malloc_disable.
500 return Malloc(malloc_enable)();