diff options
Diffstat (limited to 'src/kernel/core/paging.c')
-rw-r--r-- | src/kernel/core/paging.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/kernel/core/paging.c b/src/kernel/core/paging.c index 03a973f..cefb8c3 100644 --- a/src/kernel/core/paging.c +++ b/src/kernel/core/paging.c @@ -209,13 +209,7 @@ bool pd_map_page(void* vaddr, uint32_t frame_id, bool rw) { mutex_lock(&pdd->mutex); if (!(pd->page[pt] & PTE_PRESENT)) { - uint32_t new_pt_frame; - int tries = 0; - while ((new_pt_frame = frame_alloc(1)) == 0 && (tries++) < 3) { - mutex_unlock(&pdd->mutex); - free_some_memory(); - mutex_lock(&pdd->mutex); - } + uint32_t new_pt_frame = frame_alloc(1); if (new_pt_frame == 0) { mutex_unlock(&pdd->mutex); return false; |