From 2c928f61730eb9f4154c757e65e9bd99ba8e48ba Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 22 May 2011 17:46:16 +0000 Subject: Correct an error in r222163. Unless UMA_MD_SMALL_ALLOC is defined, startup_alloc() must be used until uma_startup2() is called. Reported by: jh --- sys/vm/uma_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/vm/uma_core.c') diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index f969547..8da5b8e 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1318,9 +1318,13 @@ keg_ctor(void *mem, int size, void *udata, int flags) #ifdef UMA_MD_SMALL_ALLOC keg->uk_allocf = uma_small_alloc; keg->uk_freef = uma_small_free; -#endif + if (booted < UMA_STARTUP) keg->uk_allocf = startup_alloc; +#else + if (booted < UMA_STARTUP2) + keg->uk_allocf = startup_alloc; +#endif } else if (booted < UMA_STARTUP2 && (keg->uk_flags & UMA_ZFLAG_INTERNAL)) keg->uk_allocf = startup_alloc; -- cgit v1.1