summaryrefslogtreecommitdiff
path: root/kernel/arch/i386
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-03-25 21:02:58 +0100
committerAnton Kling <anton@kling.gg>2024-03-25 21:04:10 +0100
commit3deb2df8e62a5f0a5535ee734a5aa13b0959f53f (patch)
treeaf8841076c95ae3de7dcd4a006026be2607a0fbf /kernel/arch/i386
parent6baa733f5682f660143c851a635a53dc2c2df7ae (diff)
Random changes
Diffstat (limited to 'kernel/arch/i386')
-rw-r--r--kernel/arch/i386/mmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/arch/i386/mmu.c b/kernel/arch/i386/mmu.c
index 8761dd8..9b63a9a 100644
--- a/kernel/arch/i386/mmu.c
+++ b/kernel/arch/i386/mmu.c
@@ -156,11 +156,11 @@ void write_to_frame(u32 frame_address, u8 on) {
num_allocated_frames++;
tmp_small_frames[INDEX_FROM_BIT(frame)] |=
((u32)0x1 << OFFSET_FROM_BIT(frame));
- return;
+ } else {
+ num_allocated_frames--;
+ tmp_small_frames[INDEX_FROM_BIT(frame)] &=
+ ~((u32)0x1 << OFFSET_FROM_BIT(frame));
}
- num_allocated_frames--;
- tmp_small_frames[INDEX_FROM_BIT(frame)] &=
- ~((u32)0x1 << OFFSET_FROM_BIT(frame));
}
PageDirectory *get_active_pagedirectory(void) {