From 7bc54a622e0c57a1085cd2990a1deedc8bd4743d Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Tue, 13 Dec 2011 20:27:56 +0000 Subject: Import the slab allocator As it is intended to completely replace the zone allocator, remove it on the way. So long to the venerable code ! * Makefrag.am (libkernel_a_SOURCES): Add kern/slab.{c,h}, remove kern/kalloc.c and kern/zalloc.{c,h}. * configfrag.ac (SLAB_VERIFY, SLAB_USE_CPU_POOLS): Add defines. * i386/Makefrag.am (libkernel_a_SOURCES): Remove i386/i386/zalloc.h. * i386/configfrag.ac (CPU_L1_SHIFT): Remove define. * include/mach_debug/slab_info.h: New file. * kern/slab.c: Likewise. * kern/slab.h: Likewise. * i386/i386/zalloc.h: Remove file. * include/mach_debug/zone_info.h: Likewise. * kern/kalloc.c: Likewise. * kern/zalloc.c: Likewise. * kern/zalloc.h: Likewise. --- configfrag.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configfrag.ac') diff --git a/configfrag.ac b/configfrag.ac index 77b00248..5f13b63c 100644 --- a/configfrag.ac +++ b/configfrag.ac @@ -102,6 +102,12 @@ AC_DEFINE([STAT_TIME], [1], [STAT_TIME]) # Kernel tracing. AC_DEFINE([XPR_DEBUG], [1], [XPR_DEBUG]) + +# Slab allocator debugging facilities. +AC_DEFINE([SLAB_VERIFY], [0], [SLAB_VERIFY]) + +# Enable the CPU pool layer in the slab allocator. +AC_DEFINE([SLAB_USE_CPU_POOLS], [0], [SLAB_USE_CPU_POOLS]) # # Options. -- cgit v1.2.3