Home | History | Annotate | Download | only in mjsunit

Lines Matching refs:Malloc

3196 "  This is a version (aka dlmalloc) of malloc/free/realloc written by\n" +
3204 " Note: There may be an updated version of this malloc obtainable at\n" +
3205 " ftp://gee.cs.oswego.edu/pub/misc/malloc.c\n" +
3217 " For convenience, an include file for code using this malloc is at:\n" +
3218 " ftp://gee.cs.oswego.edu/pub/misc/malloc-2.7.1.h\n" +
3221 " excerpts from this file needed for using this malloc on ANSI C/C++\n" +
3224 " own malloc.h that does include all settings by cutting at the point\n" +
3227 "* Why use this malloc?\n" +
3230 " most tunable malloc ever written. However it is among the fastest\n" +
3233 " allocator for malloc-intensive programs.\n" +
3246 " http://gee.cs.oswego.edu/dl/html/malloc.html\n" +
3248 " You may already by default be using a C library containing a malloc\n" +
3249 " that is based on some version of this malloc (for example in\n" +
3257 " malloc(size_t n);\n" +
3300 " Even a request for zero bytes (i.e., malloc(0)) returns a\n" +
3304 " allocated than were requested in malloc) is less than or equal\n" +
3338 " extensions. If you are using malloc in a concurrent program,\n" +
3340 " derived from a version of this malloc, and is well-tuned for\n" +
3341 " concurrent programs. (See http://www.malloc.de) Note that\n" +
3352 " People have reported using previous versions of this malloc on all\n" +
3418 " probably don't want to touch unless you are extending or adapting malloc.\n" +
3430 "// In debugging builds, use the system malloc for its debugging features.\n" +
3435 " return malloc(n);\n" +
3527 " Void_t* is the pointer type that malloc should say it returns\n" +
3565 " malloc will often die when freed memory is overwritten by user\n" +
3618 " On a 64-bit machine, you may be able to reduce malloc overhead by\n" +
3649 " MALLOC_ALIGNMENT is the minimum alignment for malloc'ed chunks.\n" +
3669 " Some people think it should. Otherwise, since this malloc\n" +
3670 " returns a unique pointer for malloc(0), so does realloc(p, 0).\n" +
3698 " This is necessary when you only want to use this malloc in one part\n" +
3699 " of a program, using your regular system malloc elsewhere.\n" +
3723 " noticeably degrades performance of malloc-intensive programs.\n" +
3744 "#define mALLOc public_mALLOc\n" +
3778 "#define public_mALLOc malloc\n" +
3839 " malloc fails to be able to return memory, either because memory is\n" +
3896 " if not defined, when regions happen to be contiguous, malloc will\n" +
3917 " Define HAVE_MMAP as true to optionally make malloc() use mmap() to\n" +
3923 " This malloc is best tuned to work with mmap for large requests.\n" +
3984 " The system page size. To the extent possible, this malloc manages\n" +
4048 " This version of malloc supports the standard SVID/XPG mallinfo\n" +
4051 " a /usr/include/malloc.h defining struct mallinfo. (If you'd like to\n" +
4053 " as described above and below and save them in a malloc.h file. But\n" +
4059 " malloc. These fields are are instead filled by mallinfo() with\n" +
4063 " /usr/include/malloc.h file that includes a declaration of struct\n" +
4077 "#include \"/usr/include/malloc.h\"\n" +
4097 " normally defined in malloc.h. Only one of these (M_MXFAST) is used\n" +
4098 " in this malloc. The others (M_NLBLKS, M_GRAIN, M_KEEP) don't apply,\n" +
4099 " so setting them has no effect. But this malloc also supports other\n" +
4108 " malloc(size_t n)\n" +
4113 " If n is zero, malloc returns a minumum-sized chunk. (The minimum\n" +
4130 " allocated using malloc or a related routine such as realloc.\n" +
4163 " equivalent of a malloc-copy-free sequence.\n" +
4165 " If p is null, realloc is equivalent to malloc.\n" +
4176 " be reallocated using malloc-copy-free sequences unless\n" +
4195 " 8-byte alignment is guaranteed by normal malloc calls, so don't\n" +
4226 " normally defined in malloc.h. Only one of these (M_MXFAST) is used\n" +
4227 " in this malloc. The others (M_NLBLKS, M_GRAIN, M_KEEP) don't apply,\n" +
4228 " so setting them has no effect. But this malloc also supports four\n" +
4358 " should instead use a single regular malloc, and assign pointers at\n" +
4387 " detect enough difference from series of malloc calls to bother.\n" +
4430 " the malloc pool. You can call this after freeing large blocks of\n" +
4466 " p = malloc(n);\n" +
4481 " number of bytes allocated via malloc (or realloc, etc) but not yet\n" +
4490 " (normally sbrk) outside of malloc.\n" +
4511 " This malloc manages fastbins very conservatively yet still\n" +
4523 " M_MXFAST to 0 to disable all use of fastbins. This causes the malloc\n" +
4530 "/* M_MXFAST is a standard SVID/XPG tuning option, usually listed in malloc.h */\n" +
4561 " If you are using this malloc in a long-lived program, it should\n" +
4611 " a new malloc request, this much padding is added to the sbrk\n" +
4622 " that nearly every malloc request during program start-up (or\n" +
4668 " 3. It causes malloc performance to be more dependent on host\n" +
4672 " malloc steps is faster than going through a system's mmap.\n" +
4711 " To make a fully customizable malloc.h header file, cut everything\n" +
4712 " above this line, put into file malloc.h, edit to suit, and #include it\n" +
4713 " on the next line, as well as in programs that use this malloc.\n" +
4717 "/* #include \"malloc.h\" */\n" +
4725 "static Void_t* mALLOc(size_t);\n" +
4741 "static Void_t* mALLOc();\n" +
4800 " m = mALLOc(bytes);\n" +
5164 " the malloc code, but \"mem\" is the pointer that is returned to the\n" +
5223 "/* conversion from malloc headers to user pointers, and back */\n" +
5231 "/* The smallest size we can malloc is an aligned minimal chunk */\n" +
5291 " people extending or adapting this malloc.\n" +
5363 " unusual as malloc request sizes, but are more usual for fragments\n" +
5490 " best fit guarantees to sometimes speed up malloc by increasing value.\n" +
5491 " Doing this means that malloc may choose a chunk that is\n" +
5511 " in regular bins after malloc gives them ONE chance to be used before\n" +
5514 " and taken off (to be either used or placed in bins) in malloc.\n" +
5529 " extension on the first malloc request, we avoid having any special\n" +
5530 " code in malloc to check whether it even exists yet. But we still\n" +
5549 " when they are noticed to be empty during traversal in malloc.\n" +
5716 " There is exactly one instance of this struct in this malloc.\n" +
5717 " If you are adapting this malloc in a way that does NOT use a static\n" +
5719 " malloc relies on the property that malloc_state is initialized to\n" +
5728 " the public versions of malloc and free, but other routines\n" +
5729 " that in turn invoke malloc and/or free may call more then once.\n" +
5804 " in malloc. In which case, please report it!)\n" +
6010 " This may be useful for debugging malloc, as well as detecting user\n" +
6013 " If you are extending or experimenting with this malloc, you can\n" +
6138 " sysmalloc handles malloc cases requiring more memory from the system.\n" +
6174 " malloc from scratch rather than getting memory from system. This\n" +
6176 " upon entry to malloc. It is much easier to handle this case here\n" +
6177 " than in malloc proper.\n" +
6183 " return mALLOc(nb - MALLOC_ALIGN_MASK);\n" +
6372 " * We need to ensure that all returned chunks from malloc will meet\n" +
6397 " malloc or by other threads. We cannot guarantee to detect\n" +
6576 " memory at the `high' end of the malloc pool. It is called\n" +
6644 " ------------------------------ malloc ------------------------------\n" +
6649 "Void_t* mALLOc(size_t bytes)\n" +
6651 " Void_t* mALLOc(bytes) size_t bytes;\n" +
7031 " and used quickly in malloc.\n" +
7083 " been given one chance to be used in malloc.\n" +
7169 " malloc anyway, it turns out to be the perfect place to trigger\n" +
7209 " until malloc is sure that chunks aren't immediately going to be\n" +
7315 " /* realloc of null is supposed to be same as malloc */\n" +
7316 " if (oldmem == 0) return mALLOc(bytes);\n" +
7357 " newmem = mALLOc(nb - MALLOC_ALIGN_MASK);\n" +
7483 " newmem = mALLOc(nb - MALLOC_ALIGN_MASK);\n" +
7511 " char* m; /* memory returned by malloc call */\n" +
7521 " /* If need less alignment than we give anyway, just relay to malloc */\n" +
7523 " if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes);\n" +
7544 " /* Call malloc with worst case padding to hit alignment. */\n" +
7546 " m = (char*)(mALLOc(nb + alignment + MINSIZE));\n" +
7621 " Void_t* mem = mALLOc(n_elements * elem_size);\n" +
7763 " return (Void_t**) mALLOc(0);\n" +
7786 " But first disable mmap so malloc won't use it, since\n" +
7792 " mem = mALLOc(size);\n" +
8115 " but this will generally result in a malloc failure.)\n" +
8119 " nonzero call. This malloc does NOT call MORECORE(0)\n" +
8124 " addresses, it must be OK for malloc'ed chunks to span multiple\n" +
8151 " Malloc only has limited ability to detect failures of MORECORE\n" +
8157 " If you are using this malloc with something other than sbrk (or its\n" +
8233 " For additional information about this code, and malloc on Win32, see\n" +