mapmalloc(3malloc) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

mapmalloc(3malloc)

Memory Allocation Library Functions                         mapmalloc(3MALLOC)



NAME
       mapmalloc - memory allocator

SYNOPSIS
       cc [ flag ... ] file ... -lmapmalloc [ library ... ]

       #include <stdlib.h>

       void *malloc(size_t size);


       void *calloc(size_t nelem, size_t elsize);


       void *realloc(void *ptr, size_t size);


       size_t malloc_usable_size(void *ptr);


       void free(void *ptr);

DESCRIPTION
       The  collection of malloc functions in this library use mmap(2) instead
       of sbrk(2) for acquiring new heap space. The functions in this  library
       are  intended to be used only if necessary, when applications must call
       sbrk(), but need to call other library routines that might call malloc.
       The  algorithms used by these functions are not sophisticated. There is
       no reclaiming of memory.


       They operate as described on the malloc(3C) manual page, except for the
       following differences:

           o      Space  for  the memory arena is obtained via mmap(2) instead
                  of sbrk(2).


           o      Support for using adi(7) is not available.


           o      Entry points for memalign() and valloc() are empty  routines
                  that  return  failure,  and are provided only to protect the
                  user from mixing malloc() functions from different implemen‐
                  tations. This will also cause calls to aligned_alloc(3C) and
                  posix_memalign(3C) to fail.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ MT-LevelSafe


USAGE
       See  malloc(3C)  for  an  overview and comparison of all the allocation
       libraries provided by Oracle Solaris.

SEE ALSO
       brk(2), mmap(2), malloc(3C), libmapmalloc(3LIB), attributes(7)



Oracle Solaris 11.4               7 Feb 2019                mapmalloc(3MALLOC)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3