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/sys/malloc.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $OpenBSD: malloc.h,v 1.94 2008/10/18 12:11:30 kettenis Exp $    */
    2 /*      $NetBSD: malloc.h,v 1.39 1998/07/12 19:52:01 augustss Exp $     */
    3 
    4 /*
    5  * Copyright (c) 1987, 1993
    6  *      The Regents of the University of California.  All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or without
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above copyright
   14  *    notice, this list of conditions and the following disclaimer in the
   15  *    documentation and/or other materials provided with the distribution.
   16  * 3. Neither the name of the University nor the names of its contributors
   17  *    may be used to endorse or promote products derived from this software
   18  *    without specific prior written permission.
   19  *
   20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   30  * SUCH DAMAGE.
   31  *
   32  *      @(#)malloc.h    8.5 (Berkeley) 5/3/95
   33  */
   34 
   35 #ifndef _SYS_MALLOC_H_
   36 #define _SYS_MALLOC_H_
   37 
   38 #define KERN_MALLOC_BUCKETS     1
   39 #define KERN_MALLOC_BUCKET      2
   40 #define KERN_MALLOC_KMEMNAMES   3
   41 #define KERN_MALLOC_KMEMSTATS   4
   42 #define KERN_MALLOC_MAXID       5
   43 
   44 #define CTL_KERN_MALLOC_NAMES { \
   45         { 0, 0 }, \
   46         { "buckets", CTLTYPE_STRING }, \
   47         { "bucket", CTLTYPE_NODE }, \
   48         { "kmemnames", CTLTYPE_STRING }, \
   49         { "kmemstat", CTLTYPE_NODE }, \
   50 }
   51 
   52 /*
   53  * flags to malloc
   54  */
   55 #define M_WAITOK        0x0000
   56 #define M_NOWAIT        0x0001
   57 #define M_CANFAIL       0x0002
   58 #define M_ZERO          0x0004
   59 
   60 /*
   61  * Types of memory to be allocated
   62  */
   63 #define M_FREE          0       /* should be on free list */
   64 #define M_MBUF          1       /* mbuf */
   65 #define M_DEVBUF        2       /* device driver memory */
   66 #define M_DEBUG         3       /* debug chunk */
   67 #define M_PCB           4       /* protocol control block */
   68 #define M_RTABLE        5       /* routing tables */
   69 /* 6 - free */
   70 #define M_FTABLE        7       /* fragment reassembly header */
   71 /* 8 - free */
   72 #define M_IFADDR        9       /* interface address */
   73 #define M_SOOPTS        10      /* socket options */
   74 #define M_SYSCTL        11      /* sysctl buffers (persistent storage) */
   75 /* 12 - free */
   76 /* 13 - free */
   77 #define M_IOCTLOPS      14      /* ioctl data buffer */
   78 /* 15-18 - free */
   79 #define M_IOV           19      /* large iov's */
   80 #define M_MOUNT         20      /* vfs mount struct */
   81 /* 21 - free */
   82 #define M_NFSREQ        22      /* NFS request header */
   83 #define M_NFSMNT        23      /* NFS mount structure */
   84 #define M_NFSNODE       24      /* NFS vnode private part */
   85 #define M_VNODE         25      /* Dynamically allocated vnodes */
   86 #define M_CACHE         26      /* Dynamically allocated cache entries */
   87 #define M_DQUOT         27      /* UFS quota entries */
   88 #define M_UFSMNT        28      /* UFS mount structure */
   89 #define M_SHM           29      /* SVID compatible shared memory segments */
   90 #define M_VMMAP         30      /* VM map structures */
   91 #define M_SEM           31      /* SVID compatible semaphores */
   92 #define M_DIRHASH       32      /* UFS dirhash */
   93 #define M_ACPI          33      /* ACPI */
   94 #define M_VMPMAP        34      /* VM pmap */
   95 /* 35-37 - free */
   96 #define M_FILE          38      /* Open file structure */
   97 #define M_FILEDESC      39      /* Open file descriptor table */
   98 /* 40 - free */
   99 #define M_PROC          41      /* Proc structures */
  100 #define M_SUBPROC       42      /* Proc sub-structures */
  101 #define M_VCLUSTER      43      /* Cluster for VFS */
  102 /* 45-46 - free */
  103 #define M_MFSNODE       46      /* MFS vnode private part */
  104 /* 47-48 - free */
  105 #define M_NETADDR       49      /* Export host address structure */
  106 #define M_NFSSVC        50      /* Nfs server structure */
  107 #define M_NFSUID        51      /* Nfs uid mapping structure */
  108 #define M_NFSD          52      /* Nfs server daemon structure */
  109 #define M_IPMOPTS       53      /* internet multicast options */
  110 #define M_IPMADDR       54      /* internet multicast address */
  111 #define M_IFMADDR       55      /* link-level multicast address */
  112 #define M_MRTABLE       56      /* multicast routing tables */
  113 #define M_ISOFSMNT      57      /* ISOFS mount structure */
  114 #define M_ISOFSNODE     58      /* ISOFS vnode private part */
  115 #define M_MSDOSFSMNT    59      /* MSDOS FS mount structure */
  116 #define M_MSDOSFSFAT    60      /* MSDOS FS fat table */
  117 #define M_MSDOSFSNODE   61      /* MSDOS FS vnode private part */
  118 #define M_TTYS          62      /* allocated tty structures */
  119 #define M_EXEC          63      /* argument lists & other mem used by exec */
  120 #define M_MISCFSMNT     64      /* miscfs mount structures */
  121 /* 65-73 - free */
  122 #define M_PFKEY         74      /* pfkey data */
  123 #define M_TDB           75      /* Transforms database */
  124 #define M_XDATA         76      /* IPsec data */
  125 /* 77 - free */
  126 #define M_PAGEDEP       78      /* File page dependencies */
  127 #define M_INODEDEP      79      /* Inode dependencies */
  128 #define M_NEWBLK        80      /* New block allocation */
  129 /* 81-82 - free */
  130 #define M_INDIRDEP      83      /* Indirect block dependencies */
  131 /* 84-91 - free */
  132 #define M_VMSWAP        92      /* VM swap structures */
  133 /* 93-96 - free */
  134 #define M_RAIDFRAME     97      /* RAIDframe data */
  135 #define M_UVMAMAP       98      /* UVM amap and related */
  136 #define M_UVMAOBJ       99      /* UVM aobj and related */
  137 /* 100 - free */
  138 #define M_USB           101     /* USB general */
  139 #define M_USBDEV        102     /* USB device driver */
  140 #define M_USBHC         103     /* USB host controller */
  141 /* 104 - free */
  142 #define M_MEMDESC       105     /* Memory range */
  143 /* 106-107 - free */
  144 #define M_CRYPTO_DATA   108     /* Crypto framework data buffers (keys etc.) */
  145 /* 109 - free */
  146 #define M_CREDENTIALS   110     /* IPsec-related credentials and ID info */
  147 #define M_PACKET_TAGS   111     /* Packet-attached information */
  148 #define M_1394CTL       112     /* IEEE 1394 control structures */
  149 #define M_1394DATA      113     /* IEEE 1394 data buffers */
  150 #define M_EMULDATA      114     /* Per-process emulation data */
  151 /* 115-122 - free */
  152 
  153 /* KAME IPv6 */
  154 #define M_IP6OPT        123     /* IPv6 options */
  155 #define M_IP6NDP        124     /* IPv6 Neighbour Discovery */
  156 #define M_IP6RR         125     /* IPv6 Router Renumbering Prefix */
  157 #define M_RR_ADDR       126     /* IPv6 Router Renumbering Ifid */
  158 #define M_TEMP          127     /* misc temporary data buffers */
  159 
  160 #define M_NTFSMNT       128     /* NTFS mount structure */
  161 #define M_NTFSNTNODE    129     /* NTFS ntnode information */
  162 #define M_NTFSFNODE     130     /* NTFS fnode information */
  163 #define M_NTFSDIR       131     /* NTFS dir buffer */
  164 #define M_NTFSNTHASH    132     /* NTFS ntnode hash tables */
  165 #define M_NTFSNTVATTR   133     /* NTFS file attribute information */
  166 #define M_NTFSRDATA     134     /* NTFS resident data */
  167 #define M_NTFSDECOMP    135     /* NTFS decompression temporary */
  168 #define M_NTFSRUN       136     /* NTFS vrun storage */
  169 
  170 #define M_KEVENT        137     /* kqueue related */
  171 
  172 #define M_BLUETOOTH     138     /* Bluetooth */
  173 
  174 #define M_BWMETER       139     /* Multicast upcall bw meters */
  175 
  176 #define M_UDFMOUNT      140     /* UDF mount */
  177 #define M_UDFFENTRY     141     /* UDF file entry */
  178 #define M_UDFFID        142     /* UDF file id */
  179 
  180 #define M_BTHIDEV       143     /* Bluetooth HID */
  181 
  182 #define M_AGP           144     /* AGP Memory */
  183 
  184 #define M_DRM           145     /* Direct Rendering Manager */
  185 
  186 #define M_LAST          146     /* Must be last type + 1 */
  187 
  188 #define INITKMEMNAMES { \
  189         "free",         /* 0 M_FREE */ \
  190         "mbuf",         /* 1 M_MBUF */ \
  191         "devbuf",       /* 2 M_DEVBUF */ \
  192         "debug",        /* 3 M_DEBUG */ \
  193         "pcb",          /* 4 M_PCB */ \
  194         "routetbl",     /* 5 M_RTABLE */ \
  195         NULL,           /* 6 */ \
  196         "fragtbl",      /* 7 M_FTABLE */ \
  197         NULL, \
  198         "ifaddr",       /* 9 M_IFADDR */ \
  199         "soopts",       /* 10 M_SOOPTS */ \
  200         "sysctl",       /* 11 M_SYSCTL */ \
  201         NULL, \
  202         NULL, \
  203         "ioctlops",     /* 14 M_IOCTLOPS */ \
  204         NULL, \
  205         NULL, \
  206         NULL, \
  207         NULL, \
  208         "iov",          /* 19 M_IOV */ \
  209         "mount",        /* 20 M_MOUNT */ \
  210         NULL, \
  211         "NFS req",      /* 22 M_NFSREQ */ \
  212         "NFS mount",    /* 23 M_NFSMNT */ \
  213         "NFS node",     /* 24 M_NFSNODE */ \
  214         "vnodes",       /* 25 M_VNODE */ \
  215         "namecache",    /* 26 M_CACHE */ \
  216         "UFS quota",    /* 27 M_DQUOT */ \
  217         "UFS mount",    /* 28 M_UFSMNT */ \
  218         "shm",          /* 29 M_SHM */ \
  219         "VM map",       /* 30 M_VMMAP */ \
  220         "sem",          /* 31 M_SEM */ \
  221         "dirhash",      /* 32 M_DIRHASH */ \
  222         "ACPI",         /* 33 M_ACPI */ \
  223         "VM pmap",      /* 34 M_VMPMAP */ \
  224         NULL,   /* 35 */ \
  225         NULL,   /* 36 */ \
  226         NULL,   /* 37 */ \
  227         "file",         /* 38 M_FILE */ \
  228         "file desc",    /* 39 M_FILEDESC */ \
  229         NULL,   /* 40 */ \
  230         "proc",         /* 41 M_PROC */ \
  231         "subproc",      /* 42 M_SUBPROC */ \
  232         "VFS cluster",  /* 43 M_VCLUSTER */ \
  233         NULL, \
  234         NULL, \
  235         "MFS node",     /* 46 M_MFSNODE */ \
  236         NULL, \
  237         NULL, \
  238         "Export Host",  /* 49 M_NETADDR */ \
  239         "NFS srvsock",  /* 50 M_NFSSVC */ \
  240         "NFS uid",      /* 51 M_NFSUID */ \
  241         "NFS daemon",   /* 52 M_NFSD */ \
  242         "ip_moptions",  /* 53 M_IPMOPTS */ \
  243         "in_multi",     /* 54 M_IPMADDR */ \
  244         "ether_multi",  /* 55 M_IFMADDR */ \
  245         "mrt",          /* 56 M_MRTABLE */ \
  246         "ISOFS mount",  /* 57 M_ISOFSMNT */ \
  247         "ISOFS node",   /* 58 M_ISOFSNODE */ \
  248         "MSDOSFS mount", /* 59 M_MSDOSFSMNT */ \
  249         "MSDOSFS fat",  /* 60 M_MSDOSFSFAT */ \
  250         "MSDOSFS node", /* 61 M_MSDOSFSNODE */ \
  251         "ttys",         /* 62 M_TTYS */ \
  252         "exec",         /* 63 M_EXEC */ \
  253         "miscfs mount", /* 64 M_MISCFSMNT */ \
  254         NULL, \
  255         NULL, \
  256         NULL, \
  257         NULL, \
  258         NULL, \
  259         NULL, \
  260         NULL, \
  261         NULL, \
  262         NULL, \
  263         "pfkey data",   /* 74 M_PFKEY */ \
  264         "tdb",          /* 75 M_TDB */ \
  265         "xform_data",   /* 76 M_XDATA */ \
  266         NULL, \
  267         "pagedep",      /* 78 M_PAGEDEP */ \
  268         "inodedep",     /* 79 M_INODEDEP */ \
  269         "newblk",       /* 80 M_NEWBLK */ \
  270         NULL, \
  271         NULL, \
  272         "indirdep",     /* 83 M_INDIRDEP */ \
  273         NULL, NULL, NULL, NULL, \
  274         NULL, NULL, NULL, NULL, \
  275         "VM swap",      /* 92 M_VMSWAP */ \
  276         NULL, NULL, NULL, NULL, \
  277         "RAIDframe data", /* 97 M_RAIDFRAME */ \
  278         "UVM amap",     /* 98 M_UVMAMAP */ \
  279         "UVM aobj",     /* 99 M_UVMAOBJ */ \
  280         NULL, \
  281         "USB",          /* 101 M_USB */ \
  282         "USB device",   /* 102 M_USBDEV */ \
  283         "USB HC",       /* 103 M_USBHC */ \
  284         NULL, \
  285         "memdesc",      /* 105 M_MEMDESC */ \
  286         NULL,   /* 106 */ \
  287         NULL, \
  288         "crypto data",  /* 108 M_CRYPTO_DATA */ \
  289         NULL, \
  290         "IPsec creds",  /* 110 M_CREDENTIALS */ \
  291         "packet tags",  /* 111 M_PACKET_TAGS */ \
  292         "1394ctl",      /* 112 M_1394CTL */ \
  293         "1394data",     /* 113 M_1394DATA */ \
  294         "emuldata",     /* 114 M_EMULDATA */ \
  295         NULL, NULL, NULL, NULL, \
  296         NULL, NULL, NULL, NULL, \
  297         "ip6_options",  /* 123 M_IP6OPT */ \
  298         "NDP",          /* 124 M_IP6NDP */ \
  299         "ip6rr",        /* 125 M_IP6RR */ \
  300         "rp_addr",      /* 126 M_RR_ADDR */ \
  301         "temp",         /* 127 M_TEMP */ \
  302         "NTFS mount",   /* 128 M_NTFSMNT */ \
  303         "NTFS node",    /* 129 M_NTFSNTNODE */ \
  304         "NTFS fnode",   /* 130 M_NTFSFNODE */ \
  305         "NTFS dir",     /* 131 M_NTFSDIR */ \
  306         "NTFS hash tables",     /* 132 M_NTFSNTHASH */ \
  307         "NTFS file attr",       /* 133 M_NTFSNTVATTR */ \
  308         "NTFS resident data ",  /* 134 M_NTFSRDATA */ \
  309         "NTFS decomp",  /* 135 M_NTFSDECOMP */ \
  310         "NTFS vrun",    /* 136 M_NTFSRUN */ \
  311         "kqueue",       /* 137 M_KEVENT */ \
  312         "bluetooth",    /* 138 M_BLUETOOTH */ \
  313         "bwmeter",      /* 139 M_BWMETER */ \
  314         "UDF mount",    /* 140 M_UDFMOUNT */ \
  315         "UDF file entry",       /* 141 M_UDFFENTRY */ \
  316         "UDF file id",  /* 142 M_UDFFID */ \
  317         "Bluetooth HID",        /* 143 M_BTHIDEV */ \
  318         "AGP Memory",   /* 144 M_AGP */ \
  319         "Direct Rendering Manager",     /* 145 M_DRM */ \
  320 }
  321 
  322 struct kmemstats {
  323         long    ks_inuse;       /* # of packets of this type currently in use */
  324         long    ks_calls;       /* total packets of this type ever allocated */
  325         long    ks_memuse;      /* total memory held in bytes */
  326         u_short ks_limblocks;   /* number of times blocked for hitting limit */
  327         u_short ks_mapblocks;   /* number of times blocked for kernel map */
  328         long    ks_maxused;     /* maximum number ever used */
  329         long    ks_limit;       /* most that are allowed to exist */
  330         long    ks_size;        /* sizes of this thing that are allocated */
  331         long    ks_spare;
  332 };
  333 
  334 /*
  335  * Array of descriptors that describe the contents of each page
  336  */
  337 struct kmemusage {
  338         short ku_indx;          /* bucket index */
  339         union {
  340                 u_short freecnt;/* for small allocations, free pieces in page */
  341                 u_short pagecnt;/* for large allocations, pages alloced */
  342         } ku_un;
  343 };
  344 #define ku_freecnt ku_un.freecnt
  345 #define ku_pagecnt ku_un.pagecnt
  346 
  347 /*
  348  * Set of buckets for each size of memory block that is retained
  349  */
  350 struct kmembuckets {
  351         caddr_t   kb_next;      /* list of free blocks */
  352         caddr_t   kb_last;      /* last free block */
  353         u_int64_t kb_calls;     /* total calls to allocate this size */
  354         u_int64_t kb_total;     /* total number of blocks allocated */
  355         u_int64_t kb_totalfree; /* # of free elements in this bucket */
  356         u_int64_t kb_elmpercl;  /* # of elements in this sized allocation */
  357         u_int64_t kb_highwat;   /* high water mark */
  358         u_int64_t kb_couldfree; /* over high water mark and could free */
  359 };
  360 
  361 #ifdef _KERNEL
  362 #define MINALLOCSIZE    (1 << MINBUCKET)
  363 #define BUCKETINDX(size) \
  364         ((size) <= (MINALLOCSIZE * 128) \
  365                 ? (size) <= (MINALLOCSIZE * 8) \
  366                         ? (size) <= (MINALLOCSIZE * 2) \
  367                                 ? (size) <= (MINALLOCSIZE * 1) \
  368                                         ? (MINBUCKET + 0) \
  369                                         : (MINBUCKET + 1) \
  370                                 : (size) <= (MINALLOCSIZE * 4) \
  371                                         ? (MINBUCKET + 2) \
  372                                         : (MINBUCKET + 3) \
  373                         : (size) <= (MINALLOCSIZE* 32) \
  374                                 ? (size) <= (MINALLOCSIZE * 16) \
  375                                         ? (MINBUCKET + 4) \
  376                                         : (MINBUCKET + 5) \
  377                                 : (size) <= (MINALLOCSIZE * 64) \
  378                                         ? (MINBUCKET + 6) \
  379                                         : (MINBUCKET + 7) \
  380                 : (size) <= (MINALLOCSIZE * 2048) \
  381                         ? (size) <= (MINALLOCSIZE * 512) \
  382                                 ? (size) <= (MINALLOCSIZE * 256) \
  383                                         ? (MINBUCKET + 8) \
  384                                         : (MINBUCKET + 9) \
  385                                 : (size) <= (MINALLOCSIZE * 1024) \
  386                                         ? (MINBUCKET + 10) \
  387                                         : (MINBUCKET + 11) \
  388                         : (size) <= (MINALLOCSIZE * 8192) \
  389                                 ? (size) <= (MINALLOCSIZE * 4096) \
  390                                         ? (MINBUCKET + 12) \
  391                                         : (MINBUCKET + 13) \
  392                                 : (size) <= (MINALLOCSIZE * 16384) \
  393                                         ? (MINBUCKET + 14) \
  394                                         : (MINBUCKET + 15))
  395 
  396 /*
  397  * Turn virtual addresses into kmem map indices
  398  */
  399 #define kmemxtob(alloc) (kmembase + (alloc) * NBPG)
  400 #define btokmemx(addr)  (((caddr_t)(addr) - kmembase) / NBPG)
  401 #define btokup(addr)    (&kmemusage[((caddr_t)(addr) - kmembase) >> PAGE_SHIFT])
  402 
  403 extern struct kmemstats kmemstats[];
  404 extern struct kmemusage *kmemusage;
  405 extern char *kmembase;
  406 extern struct kmembuckets bucket[];
  407 
  408 extern void *malloc(unsigned long size, int type, int flags);
  409 extern void free(void *addr, int type);
  410 extern int sysctl_malloc(int *, u_int, void *, size_t *, void *, size_t,
  411                               struct proc *);
  412 
  413 size_t malloc_roundup(size_t);
  414 void    malloc_printit(int (*)(const char *, ...));
  415 
  416 #ifdef MALLOC_DEBUG
  417 int     debug_malloc(unsigned long, int, int, void **);
  418 int     debug_free(void *, int);
  419 void    debug_malloc_init(void);
  420 void    debug_malloc_assert_allocated(void *, const char *);
  421 #define DEBUG_MALLOC_ASSERT_ALLOCATED(addr)                     \
  422         debug_malloc_assert_allocated(addr, __func__)
  423 
  424 void    debug_malloc_print(void);
  425 void    debug_malloc_printit(int (*)(const char *, ...), vaddr_t);
  426 #endif /* MALLOC_DEBUG */
  427 #endif /* _KERNEL */
  428 #endif /* !_SYS_MALLOC_H_ */

Cache object: 0f37550619cdebf140f7b3fcd2c2ed0d


[ 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.