Deleted Added
full compact
uma.h (95758) uma.h (95766)
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 95758 2002-04-29 23:45:41Z jeff $
26 * $FreeBSD: head/sys/vm/uma.h 95766 2002-04-30 04:26:34Z 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
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.
201 * flags See sys/malloc.h for available flags.
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
202 *
203 * Returns:
204 * A non null pointer to an initialized element from the zone is
205 * garanteed if the wait flag is M_WAITOK, otherwise a null pointer may be
206 * returned if the zone is empty or the ctor failed.
207 */
208
210void *uma_zalloc_arg(uma_zone_t zone, void *arg, int wait);
209void *uma_zalloc_arg(uma_zone_t zone, void *arg, int flags);
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 */
210
211/*
212 * Allocates an item out of a zone without supplying an argument
213 *
214 * This is just a wrapper for uma_zalloc_arg for convenience.
215 *
216 */
218static __inline void *uma_zalloc(uma_zone_t zone, int wait);
217static __inline void *uma_zalloc(uma_zone_t zone, int flags);
219
220static __inline void *
218
219static __inline void *
221uma_zalloc(uma_zone_t zone, int wait)
220uma_zalloc(uma_zone_t zone, int flags)
222{
221{
223 return uma_zalloc_arg(zone, NULL, wait);
222 return uma_zalloc_arg(zone, NULL, flags);
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 ---
223}
224
225/*
226 * Frees an item back into the specified zone.
227 *
228 * Arguments:
229 * zone The zone the item was originally allocated out of.
230 * item The memory to be freed.

--- 195 unchanged lines hidden ---