mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-10-01 01:36:01 -04:00
Don't use mallinfo on non-android and non-glibc
This commit is contained in:
parent
460fef456d
commit
769e01fc4b
@ -5,6 +5,7 @@
|
||||
#include "test_util.h"
|
||||
|
||||
static void print_mallinfo(void) {
|
||||
#if defined(__GLIBC__) || defined(__ANDROID__)
|
||||
struct mallinfo info = mallinfo();
|
||||
printf("mallinfo:\n");
|
||||
printf("arena: %zu\n", (size_t)info.arena);
|
||||
@ -17,6 +18,7 @@ static void print_mallinfo(void) {
|
||||
printf("uordblks: %zu\n", (size_t)info.uordblks);
|
||||
printf("fordblks: %zu\n", (size_t)info.fordblks);
|
||||
printf("keepcost: %zu\n", (size_t)info.keepcost);
|
||||
#endif
|
||||
}
|
||||
|
||||
OPTNONE int main(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user