diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-08 10:36:51 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-08 13:06:51 +0100 |
commit | b1058b33fb32cb398d1723eb6fe59c27dc7967cc (patch) | |
tree | 49f0e5af7b7e37afd80a6dedf655917bf51ed915 /Kernel/VM/RangeAllocator.cpp | |
parent | b98d8ad5b01c41efff24faffe94918435194257a (diff) | |
download | serenity-b1058b33fb32cb398d1723eb6fe59c27dc7967cc.zip |
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
Diffstat (limited to 'Kernel/VM/RangeAllocator.cpp')
-rw-r--r-- | Kernel/VM/RangeAllocator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/VM/RangeAllocator.cpp b/Kernel/VM/RangeAllocator.cpp index 6ceee3ce68..62f2350ef9 100644 --- a/Kernel/VM/RangeAllocator.cpp +++ b/Kernel/VM/RangeAllocator.cpp @@ -112,8 +112,8 @@ Range RangeAllocator::allocate_anywhere(size_t size, size_t alignment) if (available_range.size() < (effective_size + alignment)) continue; - uintptr_t initial_base = available_range.base().offset(offset_from_effective_base).get(); - uintptr_t aligned_base = round_up_to_power_of_two(initial_base, alignment); + FlatPtr initial_base = available_range.base().offset(offset_from_effective_base).get(); + FlatPtr aligned_base = round_up_to_power_of_two(initial_base, alignment); Range allocated_range(VirtualAddress(aligned_base), size); if (available_range == allocated_range) { |