Replace buddy allocator with free list allocator
This commit is contained in:
parent
17f0892561
commit
6d4b3e90a4
2 changed files with 511 additions and 425 deletions
|
@ -61,7 +61,7 @@ export fn kmain(boot_payload: arch.BootPayload) void {
|
|||
if (!std.math.isPowerOfTwo(heap_size)) {
|
||||
heap_size = std.math.floorPowerOfTwo(usize, heap_size);
|
||||
}
|
||||
var kernel_heap = heap.init(arch.VmmPayload, &kernel_vmm, vmm.Attributes{ .kernel = true, .writable = true, .cachable = true }, heap_size, &fixed_allocator.allocator) catch |e| {
|
||||
var kernel_heap = heap.init(arch.VmmPayload, &kernel_vmm, vmm.Attributes{ .kernel = true, .writable = true, .cachable = true }, heap_size) catch |e| {
|
||||
panic_root.panic(@errorReturnTrace(), "Failed to initialise kernel heap: {}\n", .{e});
|
||||
};
|
||||
tty.init(&kernel_heap.allocator, boot_payload);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue