Lines Matching defs:mmap
143 are serviced via mmap(), where the worst case wastage is 2 *
145 minimal mmap unit); typically 4096 bytes.
284 /* Use the supplied emulation mmap, munmap */
287 /* These values don't really matter in windows mmap emulation */
304 static void *mmap(void *ptr, long size, long prot, long type, long handle, long arg);
570 Define HAVE_MMAP as true to optionally make malloc() use mmap() to
572 operating system immediately after a free(). Also, if mmap
576 This malloc is best tuned to work with mmap for large requests.
577 If you do not have mmap, allocation of very large chunks (1MB
586 MMAP_AS_MORECORE_SIZE is the minimum mmap size argument to use if
587 sbrk fails, and mmap is used as a backup (which is done only if
594 and the fact that mmap regions tend to be limited, the size should
595 be large, to avoid too many mmap calls and thus avoid running out
738 The trim threshold and the mmap control parameters (see below)
745 mmap threshold of 192K led to near-minimal long term resource
764 sbrk, mmap, and munmap otherwise degrade performance, the default
780 the main arena is obtained via mmap.
825 M_MMAP_THRESHOLD is the request size threshold for using mmap()
827 be allocated using already-existing space will be serviced via mmap.
830 Using mmap segregates relatively large chunks of memory so that
832 system. A request serviced through mmap is never reused by any
847 2. It can lead to more wastage because of mmap page alignment
853 malloc steps is faster than going through a system's mmap.
855 All together, these considerations should lead you to use mmap
867 service using mmap. This parameter exists because:
870 use by mmap.
871 2. In most systems, overreliance on mmap can degrade overall
877 Setting to 0 disables use of mmap for servicing large requests. If
945 as well as mmap. Since it cannot be an otherwise valid memory address,
1415 Nearly all versions of mmap support MAP_ANONYMOUS,
1426 mmap((addr), (size), (prot), (flags), dev_zero_fd, 0)) : \
1427 mmap((addr), (size), (prot), (flags), dev_zero_fd, 0))
1432 (mmap((addr), (size), (prot), (flags)|MAP_ANONYMOUS, -1, 0))
1496 request, and HAVE_MMAP is true, then mmap is used as a noncontiguous
1499 expand the heap, but mmap may be able to map noncontiguous space.
1500 If you'd like mmap to ALWAYS be used, you can define MORECORE to be
1682 2. Chunks allocated via mmap, which have the second-lowest-order
1758 /* size field is or'ed with IS_MMAPPED if the chunk was obtained with mmap() */
1808 /* check for mmap()'ed chunk */
1870 * If HAVE_MMAP is true, but mmap doesn't support
1871 MAP_ANONYMOUS, a dummy file descriptor for mmap.
1963 chunks via mmap.
2327 /* unless mmap has been used as sbrk backup */
2631 long size; /* arg to first MORECORE or mmap call */
2633 char* mm; /* return value from mmap call*/
2651 If have mmap, and the request size meets the mmap threshold, and
2652 the system supports mmap, and there are few enough currently
2653 allocated mmapped regions, and a call to mmap succeeds, try to
2754 negative. Note that since mmap takes size_t arg, it may succeed
2762 If have mmap, try using it as a backup when MORECORE fails. This
2765 elsewhere. Note that we ignore mmap max count and threshold limits,
2777 /* If we are relying on mmap as backup, then use larger units */
2791 After the first time mmap is used as backup, we cannot
2893 /* MORECORE/mmap must correctly align etc */
3589 If the chunk was allocated via mmap, release via munmap()
3732 * Chunks that were obtained via mmap cannot be extended or shrunk
3970 Handle mmap cases
4403 system (both via sbrk and mmap), the maximum amount (which may be
4884 /* mmap for windows */
4885 static void *mmap (void *ptr, long size, long prot, long type, long handle, long arg) {
4889 printf ("mmap %d\n", size);
5020 * new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>.
5026 * Use mmap as backup to sbrk, if available; fold these mmap-related
5072 * Add support for mmap, with help from