Lines Matching refs:malloc
1 /* ---------- To make a malloc.h, start cutting here ------------ */
4 A version of malloc/free/realloc written by Doug Lea and released to the
10 Note: There may be an updated version of this malloc obtainable at
11 ftp://g.oswego.edu/pub/misc/malloc.c
14 * Why use this malloc?
17 most tunable malloc ever written. However it is among the fastest
21 http://g.oswego.edu/dl/html/malloc.html
27 malloc(size_t n);
36 the same as p. If p is null, equivalent to malloc. Unless the
97 Even a request for zero bytes (i.e., malloc(0)) returns a
115 more bytes will be allocated than were requested in malloc), with
134 People have reported using previous versions of this malloc on all
138 People have also reported adapting this malloc for use in
156 to free(p). Otherwise, since malloc returns a unique pointer for
157 malloc(0), so does realloc(p, 0).
168 Define to non-zero to optionally make malloc() use mmap() to
176 Optionally define if you are on a system with a /usr/include/malloc.h
181 64-bit machine, yet do not want or need to allow malloc requests of
187 (for example, internally, `malloc' is named `mALLOc') needed
267 malloc will often die when freed memory is overwritten by user
296 of chunk sizes. On a 64-bit machine, you can reduce malloc
310 Some people think it should. Otherwise, since this malloc
311 returns a unique pointer for malloc(0), so does realloc(p, 0).
467 Define HAVE_MMAP to optionally make malloc() use mmap() to
503 Access to system page size. To the extent possible, this malloc
562 This version of malloc supports the standard SVID/XPG mallinfo
565 any SVID/XPG compliant system that has a /usr/include/malloc.h
568 and below and save them in a malloc.h file. But there's no
574 version of malloc. Some of these fields are are instead filled by
578 /usr/include/malloc.h file that includes a declaration of struct
588 #include "/usr/include/malloc.h"
608 #define M_MXFAST 1 /* UNUSED in this malloc */
609 #define M_NLBLKS 2 /* UNUSED in this malloc */
610 #define M_GRAIN 3 /* UNUSED in this malloc */
611 #define M_KEEP 4 /* UNUSED in this malloc */
648 If you are using this malloc in a long-lived program, it should
686 a new malloc request, this much padding is added to the sbrk
697 that nearly every malloc request during program start-up (or
740 3. It causes malloc performance to be more dependent on host
744 malloc steps is faster than going through a system's mmap.
796 using weak aliases, this malloc is NOT designed to work in
798 control are provided to ensure that multiple malloc or free calls
800 semaphore could be used across malloc, realloc, and free (which is
862 #pragma weak malloc = __libc_malloc
885 #define mALLOc malloc
934 /* ---------- To make a malloc.h, end cutting here ------------ */
1177 the malloc code, but "mem" is the pointer that is returned to the
1279 /* conversion from malloc headers to user pointers, and back */
1452 zero size, thus forcing extension on the first malloc request,
1453 we avoid having any special code in malloc to check whether
1504 identically sized chunks. This is exploited in malloc.
1528 when all are noticed to be empty during traversal in malloc.
1590 in malloc. In which case, please report it!)
2010 set_head(top, PREV_INUSE); /* will force null return from malloc */
2468 chunk can be extended, it is, else a malloc-copy-free sequence is
2527 /* realloc of null is supposed to be same as malloc */
2698 memalign requests more than enough space from malloc, finds a spot
2705 8-byte alignment is guaranteed by normal malloc calls, so don't
2720 char* m; /* memory returned by malloc call */
2731 /* If need less alignment than we give anyway, just relay to malloc */
2739 /* Call malloc with worst case padding to hit alignment. */
2846 calloc calls malloc, then zeroes out the allocated chunk.
2923 the malloc pool. You can call this after freeing large blocks of
3086 of bytes allocated via malloc (or realloc, etc) but not yet
3236 * malloc: swap order of clean-bin strategy;
3245 * merged all consolidations to one part of malloc proper
3248 * Propagate failure in realloc if malloc returns 0
3262 * Based loosely on libg++-1.2X malloc. (It retains some of the overall