uma_core.c (226313) | uma_core.c (230623) |
---|---|
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> | 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 226313 2011-10-12 18:08:28Z glebius $"); | 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 | 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 |
|
848 /* zone is passed for legacy reasons. */ 849 mem = allocf(zone, keg->uk_ppera * UMA_SLAB_SIZE, &flags, wait); 850 if (mem == NULL) { 851 if (keg->uk_flags & UMA_ZONE_OFFPAGE) 852 zone_free_item(keg->uk_slabzone, slab, NULL, 853 SKIP_NONE, ZFREE_STATFREE); 854 KEG_LOCK(keg); 855 return (NULL); --- 2532 unchanged lines hidden --- | 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 --- |