Fix: interrupt preemption
This commit is contained in:
@@ -118,16 +118,12 @@ uint64_t _allocate_page(size_t req, int idx, uint64_t l, uint64_t r)
|
||||
switch (CUR->state) {
|
||||
case PAGE_FREE:
|
||||
if (req == sz) {
|
||||
LOG("page allocated");
|
||||
LOG(l);
|
||||
DEBUG_MEM(r);
|
||||
LOG("page allocated"); LOG(l); DEBUG_MEM(r);
|
||||
CUR->state = PAGE_ALLOCATED;
|
||||
CUR->size = 0;
|
||||
return l;
|
||||
}
|
||||
LOG("page divided");
|
||||
LOG(l);
|
||||
DEBUG(r);
|
||||
LOG("page divided"); LOG(l); DEBUG_MEM(r);
|
||||
LCH->state = RCH->state = PAGE_FREE;
|
||||
LCH->size = m - l;
|
||||
RCH->size = r - m;
|
||||
|
||||
Reference in New Issue
Block a user