1/*- 2 * Copyright (c) 2002-2005, 2009 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 230623 2012-01-27 20:18:31Z kmacy $"); |
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 --- 780 unchanged lines hidden (view full) --- 840 * Malloced items are zeroed in uma_zalloc. 841 */ 842 843 if ((keg->uk_flags & UMA_ZONE_MALLOC) == 0) 844 wait |= M_ZERO; 845 else 846 wait &= ~M_ZERO; 847 |
848 if (keg->uk_flags & UMA_ZONE_NODUMP) 849 wait |= M_NODUMP; 850 |
851 /* zone is passed for legacy reasons. */ 852 mem = allocf(zone, keg->uk_ppera * UMA_SLAB_SIZE, &flags, wait); 853 if (mem == NULL) { 854 if (keg->uk_flags & UMA_ZONE_OFFPAGE) 855 zone_free_item(keg->uk_slabzone, slab, NULL, 856 SKIP_NONE, ZFREE_STATFREE); 857 KEG_LOCK(keg); 858 return (NULL); --- 2532 unchanged lines hidden --- |