The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/libsa/libsa/malloc.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #ifndef _LIBSA_MALLOC_H_
    2 #define _LIBSA_MALLOC_H_
    3 
    4 #include <sys/cdefs.h>
    5 #include "stdlib.h"
    6 
    7 __BEGIN_DECLS
    8 
    9 /*****
   10  * These functions are the minimum necessary for use
   11  * by kld and its client.
   12  */
   13 void * malloc(size_t size);
   14 void * realloc(void * address, size_t new_size);
   15 void   free(void * address);
   16 
   17 void   malloc_init(void);
   18 void   malloc_reset(void); // Destroy all memory regions
   19 
   20 
   21 /*****
   22  * These functions aren't compiled into the kernel.
   23  * Their definitions are in the files malloc_debug
   24  * and malloc_unused, in case they're ever needed.
   25  */
   26 #if 0
   27 void   free_all(void);     // "Free" all memory blocks
   28 size_t malloc_size(void * address);
   29 int    malloc_is_valid(void * address);
   30 
   31 #ifdef DEBUG
   32 size_t malloc_hiwat(void);
   33 size_t malloc_current_usage(void);
   34 size_t malloc_region_usage(void);
   35 double malloc_peak_usage(void);
   36 double malloc_min_usage(void);
   37 size_t malloc_unused(void);
   38 double malloc_current_efficiency(void);
   39 void malloc_clear_hiwat(void);
   40 void malloc_report(void);
   41 int malloc_sanity_check(void);
   42 #endif /* DEBUG */
   43 #endif /* 0 */
   44 
   45 __END_DECLS
   46 
   47 #endif /* defined _LIBSA_MALLOC_H_ */

Cache object: ac2053031351108a8f17104f898adb2c


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.