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"
|
#include "test_util.h"
|
||||||
|
|
||||||
static void print_mallinfo(void) {
|
static void print_mallinfo(void) {
|
||||||
|
#if defined(__GLIBC__) || defined(__ANDROID__)
|
||||||
struct mallinfo info = mallinfo();
|
struct mallinfo info = mallinfo();
|
||||||
printf("mallinfo:\n");
|
printf("mallinfo:\n");
|
||||||
printf("arena: %zu\n", (size_t)info.arena);
|
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("uordblks: %zu\n", (size_t)info.uordblks);
|
||||||
printf("fordblks: %zu\n", (size_t)info.fordblks);
|
printf("fordblks: %zu\n", (size_t)info.fordblks);
|
||||||
printf("keepcost: %zu\n", (size_t)info.keepcost);
|
printf("keepcost: %zu\n", (size_t)info.keepcost);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
OPTNONE int main(void) {
|
OPTNONE int main(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user