From 873f8c52699c6d4e3d32e5df253ae8ec0266a501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sat, 26 Oct 2024 07:10:37 +0000 Subject: Use alignas instead of reserved keyword --- arch/x86_64/include/arch/memory/multiboot/memory_map.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp b/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp index 858ae52..e30d2c4 100644 --- a/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp +++ b/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp @@ -21,17 +21,14 @@ namespace teachos::arch::memory::multiboot /** * @brief Defines an entry in the entries array of the memory_map struct. * - * @note Has to have all padding stripped between the individual values, because the size of the entry needs to be - * exactly 24 bytes and not one byte more. See - * https://www.gnu.org/software/c-intro-and-ref/manual/html_node/Packed-Structures.html for more information on the - * used attribute. + * @note Last value needs to be padded, because the size of the entry needs to be + * exactly 24 bytes and not one byte more. */ - struct __attribute__((packed)) memory_area + struct memory_area { uint64_t base_address; ///< Base address the memory region starts at. uint64_t area_length; ///< Size of the memory region, added to base_address results in the final address. - memory_area_type type; ///< Specific type of memory the region can contain. - uint32_t zero; ///< + alignas(8) memory_area_type type; ///< Specific type of memory the region can contain. }; /** -- cgit v1.2.3