uma.h (94157) | uma.h (94161) |
---|---|
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 94157 2002-04-07 22:56:48Z jeff $ | 26 * $FreeBSD: head/sys/vm/uma.h 94161 2002-04-08 04:48:58Z jeff $ |
27 * 28 */ 29 30/* 31 * uma.h - External definitions for the Universal Memory Allocator 32 * 33 * Jeff Roberson <jroberson@chesapeake.net> 34*/ --- 142 unchanged lines hidden (view full) --- 177#define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ 178#define UMA_ALIGN_LONG (sizeof(long) - 1) /* "" long */ 179#define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */ 180#define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */ 181#define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */ 182#define UMA_ALIGN_CACHE (16 - 1) /* Cache line size align */ 183 184/* | 27 * 28 */ 29 30/* 31 * uma.h - External definitions for the Universal Memory Allocator 32 * 33 * Jeff Roberson <jroberson@chesapeake.net> 34*/ --- 142 unchanged lines hidden (view full) --- 177#define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ 178#define UMA_ALIGN_LONG (sizeof(long) - 1) /* "" long */ 179#define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */ 180#define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */ 181#define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */ 182#define UMA_ALIGN_CACHE (16 - 1) /* Cache line size align */ 183 184/* |
185 * Destroys a uma zone | 185 * Destroys an empty uma zone. If the zone is not empty uma complains loudly. |
186 * 187 * Arguments: 188 * zone The zone we want to destroy. | 186 * 187 * Arguments: 188 * zone The zone we want to destroy. |
189 * wait This flag indicates whether or not we should wait for all 190 * allocations to free, or return an errno on outstanding memory. | |
191 * | 189 * |
192 * Returns: 193 * 0 on successful completion, or EWOULDBLOCK if there are outstanding 194 * allocations and the wait flag is M_NOWAIT | |
195 */ 196 | 190 */ 191 |
197int uma_zdestroy(uma_zone_t zone, int wait); | 192void uma_zdestroy(uma_zone_t zone); |
198 199/* 200 * Allocates an item out of a zone 201 * 202 * Arguments: 203 * zone The zone we are allocating from 204 * arg This data is passed to the ctor function 205 * wait This flag indicates whether or not we are allowed to block while --- 225 unchanged lines hidden --- | 193 194/* 195 * Allocates an item out of a zone 196 * 197 * Arguments: 198 * zone The zone we are allocating from 199 * arg This data is passed to the ctor function 200 * wait This flag indicates whether or not we are allowed to block while --- 225 unchanged lines hidden --- |