Idan Horowitz
4174fe0156
Kernel: Use find_largest_not_above in VirtualRangeAllocator
...
Instead of iterating over the regions in the tree which is O(n), we can
just use RedBlackTree's find_largest_not_above method, which is O(logn)
2021-10-07 22:10:45 +02:00
Andreas Kling
f4a9a0d561
Kernel: Make VirtualRangeAllocator return KResultOr<VirtualRange>
...
This achieves two things:
- The allocator can report more specific errors
- Callers can (and now do) use TRY() :^)
2021-09-06 01:55:27 +02:00
Andreas Kling
c922a7da09
Kernel: Rename ScopedSpinlock => SpinlockLocker
...
This matches MutexLocker, and doesn't sound like it's a lock itself.
2021-08-22 03:34:10 +02:00
Andreas Kling
55adace359
Kernel: Rename SpinLock => Spinlock
2021-08-22 03:34:10 +02:00
Andreas Kling
cd5faf4e42
Kernel: Rename Range => VirtualRange
...
...and also RangeAllocator => VirtualRangeAllocator.
This clarifies that the ranges we're dealing with are *virtual* memory
ranges and not anything else.
2021-08-06 14:05:58 +02:00