Deleted Added
full compact
uma_core.c (163702) uma_core.c (165809)
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>
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 $");
51__FBSDID("$FreeBSD: head/sys/vm/uma_core.c 165809 2007-01-05 19:09:01Z jhb $");
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
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
2684/* See uma.h */
2685int
2686uma_zone_exhausted(uma_zone_t zone)
2687{
2688 int full;
2689
2690 ZONE_LOCK(zone);
2691 full = (zone->uz_keg->uk_flags & UMA_ZFLAG_FULL);
2692 ZONE_UNLOCK(zone);
2693 return (full);
2694}
2695
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 ---
2696void *
2697uma_large_malloc(int size, int wait)
2698{
2699 void *mem;
2700 uma_slab_t slab;
2701 u_int8_t flags;
2702
2703 slab = uma_zalloc_internal(slabzone, NULL, wait);

--- 307 unchanged lines hidden ---