[kernel] Remove explicit allocator passing
Many kernel objects had to keep a hold of refrences to allocators in order to pass them on down the call chain. Remove those explicit refrences and use `operator new`, `operator delete`, and define new `kalloc` and `kfree`. Also remove `slab_allocator` and replace it with a new mixin for slab allocation, `slab_allocated`, that overrides `operator new` and `operator free` for its subclass. Remove some no longer used related headers, `buddy_allocator.h` and `address_manager.h` Tags: memory
This commit is contained in:
@@ -60,12 +60,7 @@ void irq4_callback(void *)
|
||||
|
||||
|
||||
device_manager::device_manager(const void *root_table, kutil::allocator &alloc) :
|
||||
m_lapic(nullptr),
|
||||
m_ioapics(alloc),
|
||||
m_pci(alloc),
|
||||
m_devices(alloc),
|
||||
m_irqs(alloc),
|
||||
m_blockdevs(alloc)
|
||||
m_lapic(nullptr)
|
||||
{
|
||||
kassert(root_table != 0, "ACPI root table pointer is null.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user