mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-23 16:31:20 -04:00
drop legacy glibc support
This commit is contained in:
parent
95c4b40caf
commit
64dad0a69f
2 changed files with 4 additions and 12 deletions
14
h_malloc.c
14
h_malloc.c
|
@ -1808,24 +1808,18 @@ EXPORT int h_malloc_trim(UNUSED size_t pad) {
|
|||
|
||||
EXPORT void h_malloc_stats(void) {}
|
||||
|
||||
#if defined(__GLIBC__) || defined(__ANDROID__)
|
||||
// glibc mallinfo is broken and replaced with mallinfo2
|
||||
#if defined(__GLIBC__)
|
||||
EXPORT struct mallinfo h_mallinfo(void) {
|
||||
return (struct mallinfo){0};
|
||||
}
|
||||
|
||||
#if __GLIBC_PREREQ(2, 33)
|
||||
#define HAVE_MALLINFO2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_MALLINFO2) || defined(__ANDROID__)
|
||||
#ifndef __GLIBC__
|
||||
EXPORT struct mallinfo h_mallinfo(void) {
|
||||
struct mallinfo info = {0};
|
||||
#else
|
||||
EXPORT struct mallinfo2 h_mallinfo2(void) {
|
||||
struct mallinfo2 info = {0};
|
||||
#else
|
||||
EXPORT struct mallinfo h_mallinfo(void) {
|
||||
struct mallinfo info = {0};
|
||||
#endif
|
||||
|
||||
#if CONFIG_STATS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue