Deleted Added
full compact
uma.h (244024) uma.h (247360)
1/*-
2 * Copyright (c) 2002, 2003, 2004, 2005 Jeffrey Roberson <jeff@FreeBSD.org>
3 * Copyright (c) 2004, 2005 Bosko Milekic <bmilekic@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

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

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

19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/vm/uma.h 244024 2012-12-08 09:23:05Z pjd $
27 * $FreeBSD: head/sys/vm/uma.h 247360 2013-02-26 23:35:27Z attilio $
28 *
29 */
30
31/*
32 * uma.h - External definitions for the Universal Memory Allocator
33 *
34*/
35

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

427 * align The alignment mask
428 *
429 * Returns:
430 * Nothing
431 */
432void uma_set_align(int align);
433
434/*
28 *
29 */
30
31/*
32 * uma.h - External definitions for the Universal Memory Allocator
33 *
34*/
35

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

427 * align The alignment mask
428 *
429 * Returns:
430 * Nothing
431 */
432void uma_set_align(int align);
433
434/*
435 * Switches the backing object of a zone
435 * Reserves the maximum KVA space required by the zone and configures the zone
436 * to use a VM_ALLOC_NOOBJ-based backend allocator.
436 *
437 * Arguments:
438 * zone The zone to update.
437 *
438 * Arguments:
439 * zone The zone to update.
439 * obj The VM object to use for future allocations.
440 * size The size of the object to allocate.
440 * nitems The upper limit on the number of items that can be allocated.
441 *
442 * Returns:
441 *
442 * Returns:
443 * 0 if kva space can not be allocated
443 * 0 if KVA space can not be allocated
444 * 1 if successful
445 *
446 * Discussion:
444 * 1 if successful
445 *
446 * Discussion:
447 * A NULL object can be used and uma will allocate one for you. Setting
448 * the size will limit the amount of memory allocated to this zone.
449 *
447 * When the machine supports a direct map and the zone's items are smaller
448 * than a page, the zone will use the direct map instead of allocating KVA
449 * space.
450 */
450 */
451struct vm_object;
452int uma_zone_set_obj(uma_zone_t zone, struct vm_object *obj, int size);
451int uma_zone_reserve_kva(uma_zone_t zone, int nitems);
453
454/*
455 * Sets a high limit on the number of items allowed in a zone
456 *
457 * Arguments:
458 * zone The zone to limit
459 * nitems The requested upper limit on the number of items allowed
460 *

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

516 * specified Zone's bucket cache. These should probably not
517 * be changed once allocations have already begun, but only be set
518 * immediately upon zone creation.
519 */
520void uma_zone_set_zinit(uma_zone_t zone, uma_init zinit);
521void uma_zone_set_zfini(uma_zone_t zone, uma_fini zfini);
522
523/*
452
453/*
454 * Sets a high limit on the number of items allowed in a zone
455 *
456 * Arguments:
457 * zone The zone to limit
458 * nitems The requested upper limit on the number of items allowed
459 *

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

515 * specified Zone's bucket cache. These should probably not
516 * be changed once allocations have already begun, but only be set
517 * immediately upon zone creation.
518 */
519void uma_zone_set_zinit(uma_zone_t zone, uma_init zinit);
520void uma_zone_set_zfini(uma_zone_t zone, uma_fini zfini);
521
522/*
524 * Replaces the standard page_alloc or obj_alloc functions for this zone
523 * Replaces the standard backend allocator for this zone.
525 *
526 * Arguments:
527 * zone The zone whose backend allocator is being changed.
528 * allocf A pointer to the allocation function
529 *
530 * Returns:
531 * Nothing
532 *

--- 122 unchanged lines hidden ---
524 *
525 * Arguments:
526 * zone The zone whose backend allocator is being changed.
527 * allocf A pointer to the allocation function
528 *
529 * Returns:
530 * Nothing
531 *

--- 122 unchanged lines hidden ---