mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[kernel] Fix page_tree growth bug
The logic was inverted in contains(), meaning that new parents were never being created, and the same level-0 block was just getting reused.
This commit is contained in:
@@ -44,7 +44,7 @@ inline bool contains(uint64_t page_off, uint64_t word, uint8_t &index) {
|
||||
uint64_t base = to_base(word);
|
||||
uint64_t bits = to_level(word) * bits_per_level;
|
||||
index = (page_off >> bits) & 0x3f;
|
||||
return (page_off & (~0x3full << bits)) != base;
|
||||
return (page_off & (~0x3full << bits)) == base;
|
||||
}
|
||||
|
||||
inline uint64_t index_for(uint64_t page_off, uint8_t level) {
|
||||
|
||||
Reference in New Issue
Block a user