From 078eeb7bb06395097c17a956d847e2bef7ea3b31 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 26 Jun 2021 01:17:33 +0200 Subject: [PATCH] Kernel: Make addresses returned by kmalloc() properly aligned for x86_64 --- Kernel/Heap/Heap.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Kernel/Heap/Heap.h b/Kernel/Heap/Heap.h index 88786e890e..58f55db983 100644 --- a/Kernel/Heap/Heap.h +++ b/Kernel/Heap/Heap.h @@ -20,6 +20,10 @@ class Heap { struct AllocationHeader { size_t allocation_size_in_chunks; +#if ARCH(X86_64) + // FIXME: Get rid of this somehow + size_t alignment_dummy; +#endif u8 data[0]; };