struct malloc_state {
/
*
Serialize access.
*
/
mutex_t mutex;
/
*
Flags (formerly
in
max_fast).
*
/
int
flags;
/
*
Statistics
for
locking. Only used
if
THREAD_STATS
is
defined.
*
/
long
stat_lock_direct, stat_lock_loop, stat_lock_wait;
/
*
Fastbins
*
/
mfastbinptr fastbinsY[NFASTBINS];
/
*
Base of the topmost chunk
-
-
not
otherwise kept
in
a
bin
*
/
mchunkptr top;
/
*
The remainder
from
the most recent split of a small request
*
/
mchunkptr last_remainder;
/
*
Normal bins packed as described above
*
/
mchunkptr bins[NBINS
*
2
-
2
];
/
*
Bitmap of bins
*
/
unsigned
int
binmap[BINMAPSIZE];
/
*
Linked
list
*
/
struct malloc_state
*
next
;
/
*
Linked
list
for
free arenas.
*
/
struct malloc_state
*
next_free;
/
*
Memory allocated
from
the system
in
this arena.
*
/
INTERNAL_SIZE_T system_mem;
INTERNAL_SIZE_T max_system_mem;
};