1/*-
2 * Copyright (c) 2002, 2003, 2004, 2005 Jeffrey Roberson <jeff@FreeBSD.org>
3 * Copyright (c) 2004, 2005 Bosko Milekic <bmilekic@FreeBSD.org>
4 * Copyright (c) 2004-2006 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 34 unchanged lines hidden (view full) ---
43
44/*
45 * TODO:
46 * - Improve memory usage for large allocations
47 * - Investigate cache size adjustments
48 */
49
50#include <sys/cdefs.h>
51__FBSDID("$FreeBSD: head/sys/vm/uma_core.c 163702 2006-10-26 12:55:32Z rwatson $");
52
53/* I should really use ktr.. */
54/*
55#define UMA_DEBUG 1
56#define UMA_DEBUG_ALLOC 1
57#define UMA_DEBUG_ALLOC_1 1
58*/
59
--- 2616 unchanged lines hidden (view full) ---
2676 * we visit again so that we can free pages that are empty once other
2677 * zones are drained. We have to do the same for buckets.
2678 */
2679 zone_drain(slabzone);
2680 zone_drain(slabrefzone);
2681 bucket_zone_drain();
2682}
2683
2684void *
2685uma_large_malloc(int size, int wait)
2686{
2687 void *mem;
2688 uma_slab_t slab;
2689 u_int8_t flags;
2690
2691 slab = uma_zalloc_internal(slabzone, NULL, wait);
--- 307 unchanged lines hidden ---
2 * Copyright (c) 2002, 2003, 2004, 2005 Jeffrey Roberson <jeff@FreeBSD.org>
3 * Copyright (c) 2004, 2005 Bosko Milekic <bmilekic@FreeBSD.org>
4 * Copyright (c) 2004-2006 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
--- 34 unchanged lines hidden (view full) ---
43
44/*
45 * TODO:
46 * - Improve memory usage for large allocations
47 * - Investigate cache size adjustments
48 */
49
50#include <sys/cdefs.h>
51__FBSDID("$FreeBSD: head/sys/vm/uma_core.c 163702 2006-10-26 12:55:32Z rwatson $");
52
53/* I should really use ktr.. */
54/*
55#define UMA_DEBUG 1
56#define UMA_DEBUG_ALLOC 1
57#define UMA_DEBUG_ALLOC_1 1
58*/
59
--- 2616 unchanged lines hidden (view full) ---
2676 * we visit again so that we can free pages that are empty once other
2677 * zones are drained. We have to do the same for buckets.
2678 */
2679 zone_drain(slabzone);
2680 zone_drain(slabrefzone);
2681 bucket_zone_drain();
2682}
2683
2684void *
2685uma_large_malloc(int size, int wait)
2686{
2687 void *mem;
2688 uma_slab_t slab;
2689 u_int8_t flags;
2690
2691 slab = uma_zalloc_internal(slabzone, NULL, wait);
--- 307 unchanged lines hidden ---