13 #ifndef STXXL_MALLOC_H
14 #define STXXL_MALLOC_H
20 #include <stxxl/bits/namespace.h>
23 __STXXL_BEGIN_NAMESPACE
32 typedef int return_type;
37 struct mallinfo info = mallinfo();
44 struct mallinfo info = mallinfo();
51 struct mallinfo info = mallinfo();
58 struct mallinfo info = mallinfo();
65 struct mallinfo info = mallinfo();
72 struct mallinfo info = mallinfo();
79 struct mallinfo info = mallinfo();
86 struct mallinfo info = mallinfo();
93 struct mallinfo info = mallinfo();
100 struct mallinfo info = mallinfo();
112 inline std::ostream & operator << (std::ostream & s,
const malloc_stats & st)
114 s <<
"MALLOC statistics" << std::endl;
115 s <<
"=================================================================" << std::endl;
116 s <<
"Space allocated from system not using mmap: " << st.
from_system_nmmap() <<
" bytes" << std::endl;
117 s <<
" number of free chunks : " << st.
free_chunks() << std::endl;
118 s <<
" space allocated and in use : " << st.
used() <<
" bytes" << std::endl;
119 s <<
" space allocated but not in use : " << st.
not_used() <<
" bytes" << std::endl;
120 s <<
" top-most, releasable (via malloc_trim) space: " << st.
releasable() <<
" bytes" << std::endl;
121 s <<
" maximum total allocated space (?) : " << st.
max_allocated() <<
" bytes" << std::endl;
122 s <<
" FASTBIN blocks " << std::endl;
123 s <<
" number of fastbin blocks: " << st.
fastbin_blocks() << std::endl;
124 s <<
" space available in freed fastbin blocks: " << st.
fastbin_free() <<
" bytes" << std::endl;
125 s <<
"Space allocated from system using mmap: " << st.
from_system_mmap() <<
" bytes" << std::endl;
126 s <<
" number of chunks allocated via mmap(): " << st.
mmap_chunks() << std::endl;
127 s <<
"Total space allocated from system (mmap and not mmap): " <<
129 s <<
"=================================================================" << std::endl;
136 __STXXL_END_NAMESPACE
138 #endif // !STXXL_MALLOC_H