Skip to content

Commit

Permalink
options/glibc: stub malloc_info
Browse files Browse the repository at this point in the history
  • Loading branch information
no92 committed Jan 13, 2025
1 parent 90160af commit f20852b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions options/glibc/generic/malloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
size_t malloc_usable_size(void *p) {
return getAllocator().get_size(p);
}

int malloc_info(int options, FILE *stream) {
errno = ENOSYS;
return -1;
}
2 changes: 2 additions & 0 deletions options/glibc/include/bits/glibc/glibc_malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ extern "C" {
#endif

#include <bits/size_t.h>
#include <bits/file.h>

size_t malloc_usable_size(void *__ptr);
int malloc_info(int options, FILE *stream);

#ifdef __cplusplus
}
Expand Down

0 comments on commit f20852b

Please sign in to comment.