Deleted Added
full compact
uma.h (100326) uma.h (103531)
1/*
2 * Copyright (c) 2002, Jeffrey Roberson <jroberson@chesapeake.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 2002, Jeffrey Roberson <jroberson@chesapeake.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/vm/uma.h 100326 2002-07-18 15:53:11Z markm $
26 * $FreeBSD: head/sys/vm/uma.h 103531 2002-09-18 08:26:30Z jeff $
27 *
28 */
29
30/*
31 * uma.h - External definitions for the Universal Memory Allocator
32 *
33 * Jeff Roberson <jroberson@chesapeake.net>
34*/

--- 133 unchanged lines hidden (view full) ---

168 physical memory XXX Not yet */
169#define UMA_ZONE_ZINIT 0x0002 /* Initialize with zeros */
170#define UMA_ZONE_STATIC 0x0004 /* Staticly sized zone */
171#define UMA_ZONE_OFFPAGE 0x0008 /* Force the slab structure allocation
172 off of the real memory */
173#define UMA_ZONE_MALLOC 0x0010 /* For use by malloc(9) only! */
174#define UMA_ZONE_NOFREE 0x0020 /* Do not free slabs of this type! */
175#define UMA_ZONE_MTXCLASS 0x0040 /* Create a new lock class */
27 *
28 */
29
30/*
31 * uma.h - External definitions for the Universal Memory Allocator
32 *
33 * Jeff Roberson <jroberson@chesapeake.net>
34*/

--- 133 unchanged lines hidden (view full) ---

168 physical memory XXX Not yet */
169#define UMA_ZONE_ZINIT 0x0002 /* Initialize with zeros */
170#define UMA_ZONE_STATIC 0x0004 /* Staticly sized zone */
171#define UMA_ZONE_OFFPAGE 0x0008 /* Force the slab structure allocation
172 off of the real memory */
173#define UMA_ZONE_MALLOC 0x0010 /* For use by malloc(9) only! */
174#define UMA_ZONE_NOFREE 0x0020 /* Do not free slabs of this type! */
175#define UMA_ZONE_MTXCLASS 0x0040 /* Create a new lock class */
176#define UMA_ZONE_VM 0x0080 /* Used for internal vm datastructures */
176#define UMA_ZONE_VM 0x0080 /*
177 * Used for internal vm datastructures
178 * only.
179 */
180#define UMA_ZONE_HASH 0x0100 /*
181 * Use a hash table instead of caching
182 * information in the vm_page.
183 */
177
178/* Definitions for align */
179#define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */
180#define UMA_ALIGN_LONG (sizeof(long) - 1) /* "" long */
181#define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */
182#define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */
183#define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */
184#define UMA_ALIGN_CACHE (16 - 1) /* Cache line size align */

--- 119 unchanged lines hidden (view full) ---

304
305void uma_startup(void *bootmem);
306
307/*
308 * Finishes starting up the allocator. This should
309 * be called when kva is ready for normal allocs.
310 *
311 * Arguments:
184
185/* Definitions for align */
186#define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */
187#define UMA_ALIGN_LONG (sizeof(long) - 1) /* "" long */
188#define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */
189#define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */
190#define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */
191#define UMA_ALIGN_CACHE (16 - 1) /* Cache line size align */

--- 119 unchanged lines hidden (view full) ---

311
312void uma_startup(void *bootmem);
313
314/*
315 * Finishes starting up the allocator. This should
316 * be called when kva is ready for normal allocs.
317 *
318 * Arguments:
312 * hash An area of memory that will become the malloc hash
313 * elems The number of elements in this array
319 * None
314 *
315 * Returns:
316 * Nothing
317 *
318 * Discussion:
320 *
321 * Returns:
322 * Nothing
323 *
324 * Discussion:
319 * uma_startup2 is called by kmeminit() to prepare the malloc
320 * hash bucket, and enable use of uma for malloc ops.
325 * uma_startup2 is called by kmeminit() to enable us of uma for malloc.
321 */
322
326 */
327
323void uma_startup2(void *hash, u_long elems);
328void uma_startup2(void);
324
325/*
326 * Reclaims unused memory for all zones
327 *
328 * Arguments:
329 * None
330 * Returns:
331 * None

--- 94 unchanged lines hidden ---
329
330/*
331 * Reclaims unused memory for all zones
332 *
333 * Arguments:
334 * None
335 * Returns:
336 * None

--- 94 unchanged lines hidden ---