1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) 2021 FUJITSU LIMITED. All rights reserved. 4 * Author: Yang Xu <xuyang2018.jy@cn.fujitsu.com> 5 */ 6 #ifndef MALLINFO_COMMON_H 7 #define MALLINFO_COMMON_H 8 9 #include <malloc.h> 10 #include "tst_test.h" 11 #include "config.h" 12 13 #ifdef HAVE_MALLINFO print_mallinfo(const char * msg,struct mallinfo * m)14static inline void print_mallinfo(const char *msg, struct mallinfo *m) 15 { 16 tst_res(TINFO, "%s...", msg); 17 #define P(f) tst_res(TINFO, "%s: %d", #f, m->f) 18 P(arena); 19 P(ordblks); 20 P(smblks); 21 P(hblks); 22 P(hblkhd); 23 P(usmblks); 24 P(fsmblks); 25 P(uordblks); 26 P(fordblks); 27 P(keepcost); 28 } 29 #endif 30 31 #endif 32