casacore
Loading...
Searching...
No Matches
malloc.h
Go to the documentation of this file.
1//# malloc.h: malloc functions from Doug Lea
2//# Copyright (C) 1996,1999,2001
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#if !defined(AIPS_NO_LEA_MALLOC)
27
28#ifndef CASA_MALLOC_H
29#define CASA_MALLOC_H
30
31
32/*
33 A version of malloc/free/realloc written by Doug Lea and released to the
34 public domain. Send questions/comments/complaints/performance data
35 to dl@cs.oswego.edu
36
37* VERSION 2.6.5 Wed Jun 17 15:55:16 1998 Doug Lea (dl at gee)
38*/
39
40/* The only changes from the distribution are:
41 1. Added Casacore copyright notice and guard.
42 2. Compile to nothing for linux since we already get GNU malloc there.
43 3. If AIPS_DEBUG is set compile this malloc with DEBUG on.
44*/
45
46#if defined(AIPS_LINUX)
47/* IS linux. Include malloc.h so we only have to include casa/OS/malloc.h
48 without an ifdef on OS.
49*/
50#include <malloc.h>
51#else
52/* NOT linux */
53
54#if defined(AIPS_DEBUG)
55/* Hopefully not too expensive. If so we can turn it off. */
56#define DEBUG 1
57#endif
58
59/*
60 Default header file for malloc-2.8.x, written by Doug Lea
61 and released to the public domain, as explained at
62 http://creativecommons.org/licenses/publicdomain.
63
64 last update: Wed May 27 14:25:17 2009 Doug Lea (dl at gee)
65
66 This header is for ANSI C/C++ only. You can set any of
67 the following #defines before including:
68
69 * If USE_DL_PREFIX is defined, it is assumed that malloc.c
70 was also compiled with this option, so all routines
71 have names starting with "dl".
72
73 * If HAVE_USR_INCLUDE_MALLOC_H is defined, it is assumed that this
74 file will be #included AFTER <malloc.h>. This is needed only if
75 your system defines a struct mallinfo that is incompatible with the
76 standard one declared here. Otherwise, you can include this file
77 INSTEAD of your system system <malloc.h>. At least on ANSI, all
78 declarations should be compatible with system versions
79
80 * If MSPACES is defined, declarations for mspace versions are included.
81*/
82
83#ifndef MALLOC_280_H
84#define MALLOC_280_H
85
86#ifdef __cplusplus
87extern "C" {
88#endif
89
90#include <stddef.h> /* for size_t */
91
92#ifndef ONLY_MSPACES
93#define ONLY_MSPACES 0 /* define to a value */
94#endif /* ONLY_MSPACES */
95#ifndef NO_MALLINFO
96#define NO_MALLINFO 0
97#endif /* NO_MALLINFO */
98
99
100#if !ONLY_MSPACES
101
102#ifndef USE_DL_PREFIX
103#define dlcalloc calloc
104#define dlfree free
105#define dlmalloc malloc
106#define dlmemalign memalign
107#define dlrealloc realloc
108#define dlvalloc valloc
109#define dlpvalloc pvalloc
110#define dlmallinfo mallinfo
111#define dlmallopt mallopt
112#define dlmalloc_trim malloc_trim
113#define dlmalloc_stats malloc_stats
114#define dlmalloc_usable_size malloc_usable_size
115#define dlmalloc_footprint malloc_footprint
116#define dlindependent_calloc independent_calloc
117#define dlindependent_comalloc independent_comalloc
118#endif /* USE_DL_PREFIX */
119#if !NO_MALLINFO
120#ifndef HAVE_USR_INCLUDE_MALLOC_H
121#ifndef _MALLOC_H
122#ifndef MALLINFO_FIELD_TYPE
123#define MALLINFO_FIELD_TYPE size_t
124#endif /* MALLINFO_FIELD_TYPE */
125#ifndef STRUCT_MALLINFO_DECLARED
126#define STRUCT_MALLINFO_DECLARED 1
127struct mallinfo {
128 MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
129 MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
132 MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */
133 MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */
135 MALLINFO_FIELD_TYPE uordblks; /* total allocated space */
136 MALLINFO_FIELD_TYPE fordblks; /* total free space */
137 MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
138};
139#endif /* STRUCT_MALLINFO_DECLARED */
140#endif /* _MALLOC_H */
141#endif /* HAVE_USR_INCLUDE_MALLOC_H */
142#endif /* !NO_MALLINFO */
143
144/*
145 malloc(size_t n)
146 Returns a pointer to a newly allocated chunk of at least n bytes, or
147 null if no space is available, in which case errno is set to ENOMEM
148 on ANSI C systems.
149
150 If n is zero, malloc returns a minimum-sized chunk. (The minimum
151 size is 16 bytes on most 32bit systems, and 32 bytes on 64bit
152 systems.) Note that size_t is an unsigned type, so calls with
153 arguments that would be negative if signed are interpreted as
154 requests for huge amounts of space, which will often fail. The
155 maximum supported value of n differs across systems, but is in all
156 cases less than the maximum representable value of a size_t.
157*/
158void* dlmalloc(size_t);
159
160/*
161 free(void* p)
162 Releases the chunk of memory pointed to by p, that had been previously
163 allocated using malloc or a related routine such as realloc.
164 It has no effect if p is null. If p was not malloced or already
165 freed, free(p) will by default cuase the current program to abort.
166*/
167void dlfree(void*);
168
169/*
170 calloc(size_t n_elements, size_t element_size);
171 Returns a pointer to n_elements * element_size bytes, with all locations
172 set to zero.
173*/
174void* dlcalloc(size_t, size_t);
175
176/*
177 realloc(void* p, size_t n)
178 Returns a pointer to a chunk of size n that contains the same data
179 as does chunk p up to the minimum of (n, p's size) bytes, or null
180 if no space is available.
181
182 The returned pointer may or may not be the same as p. The algorithm
183 prefers extending p in most cases when possible, otherwise it
184 employs the equivalent of a malloc-copy-free sequence.
185
186 If p is null, realloc is equivalent to malloc.
187
188 If space is not available, realloc returns null, errno is set (if on
189 ANSI) and p is NOT freed.
190
191 if n is for fewer bytes than already held by p, the newly unused
192 space is lopped off and freed if possible. realloc with a size
193 argument of zero (re)allocates a minimum-sized chunk.
194
195 The old unix realloc convention of allowing the last-free'd chunk
196 to be used as an argument to realloc is not supported.
197*/
198
199void* dlrealloc(void*, size_t);
200
201/*
202 memalign(size_t alignment, size_t n);
203 Returns a pointer to a newly allocated chunk of n bytes, aligned
204 in accord with the alignment argument.
205
206 The alignment argument should be a power of two. If the argument is
207 not a power of two, the nearest greater power is used.
208 8-byte alignment is guaranteed by normal malloc calls, so don't
209 bother calling memalign with an argument of 8 or less.
210
211 Overreliance on memalign is a sure way to fragment space.
212*/
213void* dlmemalign(size_t, size_t);
214
215/*
216 valloc(size_t n);
217 Equivalent to memalign(pagesize, n), where pagesize is the page
218 size of the system. If the pagesize is unknown, 4096 is used.
219*/
220void* dlvalloc(size_t);
221
222/*
223 mallopt(int parameter_number, int parameter_value)
224 Sets tunable parameters The format is to provide a
225 (parameter-number, parameter-value) pair. mallopt then sets the
226 corresponding parameter to the argument value if it can (i.e., so
227 long as the value is meaningful), and returns 1 if successful else
228 0. SVID/XPG/ANSI defines four standard param numbers for mallopt,
229 normally defined in malloc.h. None of these are use in this malloc,
230 so setting them has no effect. But this malloc also supports other
231 options in mallopt:
232
233 Symbol param # default allowed param values
234 M_TRIM_THRESHOLD -1 2*1024*1024 any (-1U disables trimming)
235 M_GRANULARITY -2 page size any power of 2 >= page size
236 M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support)
237*/
238int dlmallopt(int, int);
239
240#define M_TRIM_THRESHOLD (-1)
241#define M_GRANULARITY (-2)
242#define M_MMAP_THRESHOLD (-3)
243
244
245/*
246 malloc_footprint();
247 Returns the number of bytes obtained from the system. The total
248 number of bytes allocated by malloc, realloc etc., is less than this
249 value. Unlike mallinfo, this function returns only a precomputed
250 result, so can be called frequently to monitor memory consumption.
251 Even if locks are otherwise defined, this function does not use them,
252 so results might not be up to date.
253*/
254size_t dlmalloc_footprint();
255
256#if !NO_MALLINFO
257/*
258 mallinfo()
259 Returns (by copy) a struct containing various summary statistics:
260
261 arena: current total non-mmapped bytes allocated from system
262 ordblks: the number of free chunks
263 smblks: always zero.
264 hblks: current number of mmapped regions
265 hblkhd: total bytes held in mmapped regions
266 usmblks: the maximum total allocated space. This will be greater
267 than current total if trimming has occurred.
268 fsmblks: always zero
269 uordblks: current total allocated space (normal or mmapped)
270 fordblks: total free space
271 keepcost: the maximum number of bytes that could ideally be released
272 back to system via malloc_trim. ("ideally" means that
273 it ignores page restrictions etc.)
274
275 Because these fields are ints, but internal bookkeeping may
276 be kept as longs, the reported values may wrap around zero and
277 thus be inaccurate.
278*/
279
280struct mallinfo dlmallinfo(void);
281#endif /* NO_MALLINFO */
282
283/*
284 independent_calloc(size_t n_elements, size_t element_size, void* chunks[]);
285
286 independent_calloc is similar to calloc, but instead of returning a
287 single cleared space, it returns an array of pointers to n_elements
288 independent elements that can hold contents of size elem_size, each
289 of which starts out cleared, and can be independently freed,
290 realloc'ed etc. The elements are guaranteed to be adjacently
291 allocated (this is not guaranteed to occur with multiple callocs or
292 mallocs), which may also improve cache locality in some
293 applications.
294
295 The "chunks" argument is optional (i.e., may be null, which is
296 probably the most typical usage). If it is null, the returned array
297 is itself dynamically allocated and should also be freed when it is
298 no longer needed. Otherwise, the chunks array must be of at least
299 n_elements in length. It is filled in with the pointers to the
300 chunks.
301
302 In either case, independent_calloc returns this pointer array, or
303 null if the allocation failed. If n_elements is zero and "chunks"
304 is null, it returns a chunk representing an array with zero elements
305 (which should be freed if not wanted).
306
307 Each element must be individually freed when it is no longer
308 needed. If you'd like to instead be able to free all at once, you
309 should instead use regular calloc and assign pointers into this
310 space to represent elements. (In this case though, you cannot
311 independently free elements.)
312
313 independent_calloc simplifies and speeds up implementations of many
314 kinds of pools. It may also be useful when constructing large data
315 structures that initially have a fixed number of fixed-sized nodes,
316 but the number is not known at compile time, and some of the nodes
317 may later need to be freed. For example:
318
319 struct Node { int item; struct Node* next; };
320
321 struct Node* build_list() {
322 struct Node** pool;
323 int n = read_number_of_nodes_needed();
324 if (n <= 0) return 0;
325 pool = (struct Node**)(independent_calloc(n, sizeof(struct Node), 0);
326 if (pool == 0) die();
327 // organize into a linked list...
328 struct Node* first = pool[0];
329 for (i = 0; i < n-1; ++i)
330 pool[i]->next = pool[i+1];
331 free(pool); // Can now free the array (or not, if it is needed later)
332 return first;
333 }
334*/
335void** dlindependent_calloc(size_t, size_t, void**);
336
337/*
338 independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]);
339
340 independent_comalloc allocates, all at once, a set of n_elements
341 chunks with sizes indicated in the "sizes" array. It returns
342 an array of pointers to these elements, each of which can be
343 independently freed, realloc'ed etc. The elements are guaranteed to
344 be adjacently allocated (this is not guaranteed to occur with
345 multiple callocs or mallocs), which may also improve cache locality
346 in some applications.
347
348 The "chunks" argument is optional (i.e., may be null). If it is null
349 the returned array is itself dynamically allocated and should also
350 be freed when it is no longer needed. Otherwise, the chunks array
351 must be of at least n_elements in length. It is filled in with the
352 pointers to the chunks.
353
354 In either case, independent_comalloc returns this pointer array, or
355 null if the allocation failed. If n_elements is zero and chunks is
356 null, it returns a chunk representing an array with zero elements
357 (which should be freed if not wanted).
358
359 Each element must be individually freed when it is no longer
360 needed. If you'd like to instead be able to free all at once, you
361 should instead use a single regular malloc, and assign pointers at
362 particular offsets in the aggregate space. (In this case though, you
363 cannot independently free elements.)
364
365 independent_comallac differs from independent_calloc in that each
366 element may have a different size, and also that it does not
367 automatically clear elements.
368
369 independent_comalloc can be used to speed up allocation in cases
370 where several structs or objects must always be allocated at the
371 same time. For example:
372
373 struct Head { ... }
374 struct Foot { ... }
375
376 void send_message(char* msg) {
377 int msglen = strlen(msg);
378 size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) };
379 void* chunks[3];
380 if (independent_comalloc(3, sizes, chunks) == 0)
381 die();
382 struct Head* head = (struct Head*)(chunks[0]);
383 char* body = (char*)(chunks[1]);
384 struct Foot* foot = (struct Foot*)(chunks[2]);
385 // ...
386 }
387
388 In general though, independent_comalloc is worth using only for
389 larger values of n_elements. For small values, you probably won't
390 detect enough difference from series of malloc calls to bother.
391
392 Overuse of independent_comalloc can increase overall memory usage,
393 since it cannot reuse existing noncontiguous small chunks that
394 might be available for some of the elements.
395*/
396void** dlindependent_comalloc(size_t, size_t*, void**);
397
398
399/*
400 pvalloc(size_t n);
401 Equivalent to valloc(minimum-page-that-holds(n)), that is,
402 round up n to nearest pagesize.
403 */
404void* dlpvalloc(size_t);
405
406/*
407 malloc_trim(size_t pad);
408
409 If possible, gives memory back to the system (via negative arguments
410 to sbrk) if there is unused memory at the `high' end of the malloc
411 pool or in unused MMAP segments. You can call this after freeing
412 large blocks of memory to potentially reduce the system-level memory
413 requirements of a program. However, it cannot guarantee to reduce
414 memory. Under some allocation patterns, some large free blocks of
415 memory will be locked between two used chunks, so they cannot be
416 given back to the system.
417
418 The `pad' argument to malloc_trim represents the amount of free
419 trailing space to leave untrimmed. If this argument is zero, only
420 the minimum amount of memory to maintain internal data structures
421 will be left. Non-zero arguments can be supplied to maintain enough
422 trailing space to service future expected allocations without having
423 to re-obtain memory from the system.
424
425 Malloc_trim returns 1 if it actually released any memory, else 0.
426*/
427int dlmalloc_trim(size_t);
428
429/*
430 malloc_stats();
431 Prints on stderr the amount of space obtained from the system (both
432 via sbrk and mmap), the maximum amount (which may be more than
433 current if malloc_trim and/or munmap got called), and the current
434 number of bytes allocated via malloc (or realloc, etc) but not yet
435 freed. Note that this is the number of bytes allocated, not the
436 number requested. It will be larger than the number requested
437 because of alignment and bookkeeping overhead. Because it includes
438 alignment wastage as being in use, this figure may be greater than
439 zero even when no user-level chunks are allocated.
440
441 The reported current and maximum system memory can be inaccurate if
442 a program makes other calls to system memory allocation functions
443 (normally sbrk) outside of malloc.
444
445 malloc_stats prints only the most commonly interesting statistics.
446 More information can be obtained by calling mallinfo.
447*/
448void dlmalloc_stats();
449
450#endif /* !ONLY_MSPACES */
451
452/*
453 malloc_usable_size(void* p);
454
455 Returns the number of bytes you can actually use in
456 an allocated chunk, which may be more than you requested (although
457 often not) due to alignment and minimum size constraints.
458 You can use this many bytes without worrying about
459 overwriting other allocated objects. This is not a particularly great
460 programming practice. malloc_usable_size can be more useful in
461 debugging and assertions, for example:
462
463 p = malloc(n);
464 assert(malloc_usable_size(p) >= 256);
465*/
467
468
469#if MSPACES
470
471/*
472 mspace is an opaque type representing an independent
473 region of space that supports mspace_malloc, etc.
474*/
475typedef void* mspace;
476
477/*
478 create_mspace creates and returns a new independent space with the
479 given initial capacity, or, if 0, the default granularity size. It
480 returns null if there is no system memory available to create the
481 space. If argument locked is non-zero, the space uses a separate
482 lock to control access. The capacity of the space will grow
483 dynamically as needed to service mspace_malloc requests. You can
484 control the sizes of incremental increases of this space by
485 compiling with a different DEFAULT_GRANULARITY or dynamically
486 setting with mallopt(M_GRANULARITY, value).
487*/
488mspace create_mspace(size_t capacity, int locked);
489
490/*
491 destroy_mspace destroys the given space, and attempts to return all
492 of its memory back to the system, returning the total number of
493 bytes freed. After destruction, the results of access to all memory
494 used by the space become undefined.
495*/
497
498/*
499 create_mspace_with_base uses the memory supplied as the initial base
500 of a new mspace. Part (less than 128*sizeof(size_t) bytes) of this
501 space is used for bookkeeping, so the capacity must be at least this
502 large. (Otherwise 0 is returned.) When this initial space is
503 exhausted, additional memory will be obtained from the system.
504 Destroying this space will deallocate all additionally allocated
505 space (if possible) but not the initial base.
506*/
507mspace create_mspace_with_base(void* base, size_t capacity, int locked);
508
509/*
510 mspace_track_large_chunks controls whether requests for large chunks
511 are allocated in their own untracked mmapped regions, separate from
512 others in this mspace. By default large chunks are not tracked,
513 which reduces fragmentation. However, such chunks are not
514 necessarily released to the system upon destroy_mspace. Enabling
515 tracking by setting to true may increase fragmentation, but avoids
516 leakage when relying on destroy_mspace to release all memory
517 allocated using this space. The function returns the previous
518 setting.
519*/
521
522/*
523 mspace_malloc behaves as malloc, but operates within
524 the given space.
525*/
526void* mspace_malloc(mspace msp, size_t bytes);
527
528/*
529 mspace_free behaves as free, but operates within
530 the given space.
531
532 If compiled with FOOTERS==1, mspace_free is not actually needed.
533 free may be called instead of mspace_free because freed chunks from
534 any space are handled by their originating spaces.
535*/
536void mspace_free(mspace msp, void* mem);
537
538/*
539 mspace_realloc behaves as realloc, but operates within
540 the given space.
541
542 If compiled with FOOTERS==1, mspace_realloc is not actually
543 needed. realloc may be called instead of mspace_realloc because
544 realloced chunks from any space are handled by their originating
545 spaces.
546*/
547void* mspace_realloc(mspace msp, void* mem, size_t newsize);
548
549/*
550 mspace_calloc behaves as calloc, but operates within
551 the given space.
552*/
553void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
554
555/*
556 mspace_memalign behaves as memalign, but operates within
557 the given space.
558*/
559void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
560
561/*
562 mspace_independent_calloc behaves as independent_calloc, but
563 operates within the given space.
564*/
565void** mspace_independent_calloc(mspace msp, size_t n_elements,
566 size_t elem_size, void* chunks[]);
567
568/*
569 mspace_independent_comalloc behaves as independent_comalloc, but
570 operates within the given space.
571*/
572void** mspace_independent_comalloc(mspace msp, size_t n_elements,
573 size_t sizes[], void* chunks[]);
574
575/*
576 mspace_footprint() returns the number of bytes obtained from the
577 system for this space.
578*/
580
581
582#if !NO_MALLINFO
583/*
584 mspace_mallinfo behaves as mallinfo, but reports properties of
585 the given space.
586*/
588#endif /* NO_MALLINFO */
589
590/*
591 malloc_usable_size(void* p) behaves the same as malloc_usable_size;
592*/
593 size_t mspace_usable_size(void* mem);
594
595/*
596 mspace_malloc_stats behaves as malloc_stats, but reports
597 properties of the given space.
598*/
600
601/*
602 mspace_trim behaves as malloc_trim, but
603 operates within the given space.
604*/
605int mspace_trim(mspace msp, size_t pad);
606
607/*
608 An alias for mallopt.
609*/
610int mspace_mallopt(int, int);
611
612#endif /* MSPACES */
613
614#ifdef __cplusplus
615} /* end of extern "C" */
616#endif
617
618#endif /* MALLOC_280_H */
619
620#endif
621/* AIPS_LINUX */
622
623#endif
624/* AIPS_MALLOC */
625
626#endif
627/* AIPS_NO_LEA_MALLOC */
#define dlrealloc
Definition malloc.h:107
void * mspace_realloc(mspace msp, void *mem, size_t newsize)
int mspace_trim(mspace msp, size_t pad)
#define dlindependent_calloc
Definition malloc.h:116
size_t mspace_usable_size(void *mem)
void ** mspace_independent_comalloc(mspace msp, size_t n_elements, size_t sizes[], void *chunks[])
void * mspace
Definition malloc.h:475
#define dlmallopt
Definition malloc.h:111
#define dlmemalign
Definition malloc.h:106
#define MALLINFO_FIELD_TYPE
Definition malloc.h:123
size_t destroy_mspace(mspace msp)
#define dlmalloc_trim
Definition malloc.h:112
int mspace_mallopt(int, int)
#define dlmalloc_footprint
Definition malloc.h:115
#define dlmalloc
Definition malloc.h:105
void * mspace_memalign(mspace msp, size_t alignment, size_t bytes)
#define dlpvalloc
Definition malloc.h:109
mspace create_mspace_with_base(void *base, size_t capacity, int locked)
void ** mspace_independent_calloc(mspace msp, size_t n_elements, size_t elem_size, void *chunks[])
void mspace_malloc_stats(mspace msp)
#define dlfree
Definition malloc.h:104
#define dlindependent_comalloc
Definition malloc.h:117
int mspace_track_large_chunks(mspace msp, int enable)
void mspace_free(mspace msp, void *mem)
#define dlmalloc_usable_size
Definition malloc.h:114
#define dlmallinfo
Definition malloc.h:110
size_t mspace_footprint(mspace msp)
mspace create_mspace(size_t capacity, int locked)
void * mspace_calloc(mspace msp, size_t n_elements, size_t elem_size)
#define dlcalloc
Definition malloc.h:103
struct mallinfo mspace_mallinfo(mspace msp)
void * mspace_malloc(mspace msp, size_t bytes)
#define dlmalloc_stats
Definition malloc.h:113
#define dlvalloc
Definition malloc.h:108
MALLINFO_FIELD_TYPE arena
Definition malloc.h:128
MALLINFO_FIELD_TYPE fordblks
Definition malloc.h:136
MALLINFO_FIELD_TYPE uordblks
Definition malloc.h:135
MALLINFO_FIELD_TYPE usmblks
Definition malloc.h:133
MALLINFO_FIELD_TYPE fsmblks
Definition malloc.h:134
MALLINFO_FIELD_TYPE smblks
Definition malloc.h:130
MALLINFO_FIELD_TYPE keepcost
Definition malloc.h:137
MALLINFO_FIELD_TYPE hblks
Definition malloc.h:131
MALLINFO_FIELD_TYPE hblkhd
Definition malloc.h:132
MALLINFO_FIELD_TYPE ordblks
Definition malloc.h:129