diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-26 07:10:37 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-26 07:10:37 +0000 |
| commit | 873f8c52699c6d4e3d32e5df253ae8ec0266a501 (patch) | |
| tree | ef21f60a7de1b09c255f911208b9370d75d5a208 /arch | |
| parent | c2c7503fec31c07645fdc087dbf1ef487e90912e (diff) | |
| download | teachos-873f8c52699c6d4e3d32e5df253ae8ec0266a501.tar.xz teachos-873f8c52699c6d4e3d32e5df253ae8ec0266a501.zip | |
Use alignas instead of reserved keyword
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86_64/include/arch/memory/multiboot/memory_map.hpp | 11 |
1 files 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. }; /** |
