Instead of the kernel heap being a compile-time parameter, make it a runtime parameter (if DEBUG_HEAPS is specified, at least; otherwise we're hardwired to the slab heap as before.) This is similar to what's done in userland: there LD_PRELOAD and MALLOC_DEBUG control the heaps, here "kernel_malloc" and then "guarded_heap_options" kernel settings control the heap. While at it, apply fixes to the guarded and debug heaps to ensure a minimum alignment of sizeof(void*), if no specific alignment is requested. Tested with a lot of build configurations (DEBUG_HEAPS 0, 1; DEBUG_HEAPS_DEFAULT slab, guarded; USE_DEBUG_HEAPS_FOR_OBJECT_CACHE 0, 1) and with various parameters specified in the bootloader.
To customize the settings defined in these headers, create a folder "user_config_headers" in the "build" folder and copy the headers you want to modify into that folder. Your custom headers will be ignored by the version control system and the build system will automatically use them instead of the original ones. But be aware that when changes are commited to the files in "config_headers", you will have to apply them to your custom headers manually.