]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/kmem.h
2 * Copyright (c) 2008 Silicon Graphics, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #define KM_SLEEP 0x0001u
22 #define KM_NOSLEEP 0x0002u
23 #define KM_NOFS 0x0004u
24 #define KM_MAYFAIL 0x0008u
25 #define KM_LARGE 0x0010u
27 typedef struct kmem_zone
{
28 int zone_unitsize
; /* Size in bytes of zone unit */
29 char *zone_name
; /* tag name */
30 int allocated
; /* debug: How many currently allocated */
33 extern kmem_zone_t
*kmem_zone_init(int, char *);
34 extern void *kmem_zone_alloc(kmem_zone_t
*, int);
35 extern void *kmem_zone_zalloc(kmem_zone_t
*, int);
38 kmem_zone_free(kmem_zone_t
*zone
, void *ptr
)
44 extern void *kmem_alloc(size_t, int);
45 extern void *kmem_zalloc(size_t, int);
48 kmem_free(void *ptr
) {
52 extern void *kmem_realloc(void *, size_t, int);