PIPS
malloc-info.c File Reference
#include "stdio.h"
#include "stdlib.h"
+ Include dependency graph for malloc-info.c:

Go to the source code of this file.

Functions

void print_malloc_info (__attribute__((unused)) FILE *fd)
 mallinfo portability os restricted to SUN C library More...
 
void print_full_malloc_info (__attribute__((unused)) FILE *fd)
 

Function Documentation

◆ print_full_malloc_info()

void print_full_malloc_info ( __attribute__((unused)) FILE *  fd)

Definition at line 44 of file malloc-info.c.

45 {
46 /*
47  static struct mallinfo m;
48 
49  m = mallinfo();
50 
51  user_log("print_full_malloc_info",
52  "total space in arena: %d\n",
53  m.arena);
54  user_log("print_full_malloc_info",
55  "number of ordinary blocks: %d\n",
56  m.ordblks);
57  user_log("print_full_malloc_info",
58  "number of small blocks: %d\n",
59  m.smblks);
60  user_log("print_full_malloc_info",
61  "number of holding blocks: %d\n",
62  m.hblks);
63  user_log("print_full_malloc_info",
64  "space in holding block headers: %d\n",
65  m.hblkhd);
66  user_log("print_full_malloc_info",
67  "space in small blocks in use: %d\n",
68  m.usmblks);
69  user_log("print_full_malloc_info",
70  "space in free small blocks: %d\n",
71  m.fsmblks);
72  user_log("print_full_malloc_info",
73  "space in ordinary blocks in use: %d\n",
74  m.uordblks);
75  user_log("print_full_malloc_info",
76  "space in free ordinary blocks: %d\n",
77  m.fordblks);
78  user_log("print_full_malloc_info",
79  "cost of enabling keep option: %d\n",
80  m.keepcost);
81 #ifdef sun
82  user_log("print_full_malloc_info",
83  "max size of small blocks: %d\n",
84  m.mxfast);
85  user_log("print_full_malloc_info",
86  "number of small blocks in a holding block: %d\n",
87  m.nlblks);
88  user_log("print_full_malloc_info",
89  "small block rounding factor: %d\n",
90  m.grain);
91  user_log("print_full_malloc_info",
92  "space (including overhead) allocated in ord. blks: %d\n",
93  m.uordbytes);
94  user_log("print_full_malloc_info",
95  "number of ordinary blocks allocated: %d\n",
96  m.allocated);
97  user_log("print_full_malloc_info",
98  "bytes used in maintaining the free tree: %d\n",
99  m.treeoverhead);
100 #endif
101 */
102 }

◆ print_malloc_info()

void print_malloc_info ( __attribute__((unused)) FILE *  fd)

mallinfo portability os restricted to SUN C library

Definition at line 32 of file malloc-info.c.

33 {
34 /*
35  static struct mallinfo m;
36 
37  m = mallinfo();
38 
39  user_log("print_malloc_info", "T: %d U: %d F: %d\n",
40  m.arena, m.uordblks, m.fordblks);
41  */
42 }