Skip to content
Snippets Groups Projects
Commit 5a7cd654 authored by Cheng Shao's avatar Cheng Shao
Browse files

dlmalloc: expose malloc_inspect_all

parent dcd082f0
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,8 @@ static size_t dlmalloc_usable_size(void*);
#define MORECORE_CONTIGUOUS 0
#define MALLOC_INSPECT_ALL 1
// Include the upstream dlmalloc's malloc.c.
#include "malloc.c"
......@@ -97,6 +99,11 @@ size_t malloc_usable_size(void *ptr) {
return dlmalloc_usable_size(ptr);
}
void malloc_inspect_all(void (*handler)(void *, void *, size_t, void *),
void *arg) {
dlmalloc_inspect_all(handler, arg);
}
// Define these to satisfy musl references.
void *__libc_malloc(size_t) __attribute__((alias("malloc")));
void __libc_free(void *) __attribute__((alias("free")));
......
......@@ -911,6 +911,7 @@ lsearch
lseek
lstat
malloc
malloc_inspect_all
malloc_usable_size
mblen
mbrlen
......
......@@ -875,6 +875,7 @@ lsearch
lseek
lstat
malloc
malloc_inspect_all
malloc_usable_size
mblen
mbrlen
......
......@@ -994,6 +994,7 @@ lsearch
lseek
lstat
malloc
malloc_inspect_all
malloc_usable_size
mblen
mbrlen
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment