1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:27:45 +00:00

Kernel: Convert RangeAllocator to east-const style

This commit is contained in:
Andreas Kling 2021-07-14 23:53:47 +02:00
parent d60f617644
commit d4c73daacb
2 changed files with 7 additions and 7 deletions

View file

@ -19,23 +19,23 @@ public:
~RangeAllocator();
void initialize_with_range(VirtualAddress, size_t);
void initialize_from_parent(const RangeAllocator&);
void initialize_from_parent(RangeAllocator const&);
Optional<Range> allocate_anywhere(size_t, size_t alignment = PAGE_SIZE);
Optional<Range> allocate_specific(VirtualAddress, size_t);
Optional<Range> allocate_randomized(size_t, size_t alignment);
void deallocate(const Range&);
void deallocate(Range const&);
void dump() const;
bool contains(const Range& range) const
bool contains(Range const& range) const
{
ScopedSpinLock lock(m_lock);
return m_total_range.contains(range);
}
private:
void carve_at_index(int, const Range&);
void carve_at_index(int, Range const&);
Vector<Range> m_available_ranges;
Range m_total_range;