Deleted Added
sdiff udiff text old ( 95758 ) new ( 95766 )
full compact
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 95758 2002-04-29 23:45:41Z jeff $
27 *
28 */
29
30/*
31 * uma.h - External definitions for the Universal Memory Allocator
32 *
33 * Jeff Roberson <jroberson@chesapeake.net>
34*/

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

193void uma_zdestroy(uma_zone_t zone);
194
195/*
196 * Allocates an item out of a zone
197 *
198 * Arguments:
199 * zone The zone we are allocating from
200 * arg This data is passed to the ctor function
201 * wait This flag indicates whether or not we are allowed to block while
202 * allocating memory for this zone should we run out.
203 *
204 * Returns:
205 * A non null pointer to an initialized element from the zone is
206 * garanteed if the wait flag is M_WAITOK, otherwise a null pointer may be
207 * returned if the zone is empty or the ctor failed.
208 */
209
210void *uma_zalloc_arg(uma_zone_t zone, void *arg, int wait);
211
212/*
213 * Allocates an item out of a zone without supplying an argument
214 *
215 * This is just a wrapper for uma_zalloc_arg for convenience.
216 *
217 */
218static __inline void *uma_zalloc(uma_zone_t zone, int wait);
219
220static __inline void *
221uma_zalloc(uma_zone_t zone, int wait)
222{
223 return uma_zalloc_arg(zone, NULL, wait);
224}
225
226/*
227 * Frees an item back into the specified zone.
228 *
229 * Arguments:
230 * zone The zone the item was originally allocated out of.
231 * item The memory to be freed.

--- 195 unchanged lines hidden ---