summaryrefslogtreecommitdiff
path: root/src/kernel/mem/paging.cpp
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-17 11:27:59 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-17 11:27:59 +0200
commit1c7c106b06b6a88502801e699ef99e72b7c625cd (patch)
tree5708a229b0d66e8eb82a953861e017915f8176b6 /src/kernel/mem/paging.cpp
parent5bc8549a8d7f5c9644f878fe3ca55761663a2fd0 (diff)
downloadTCE-1c7c106b06b6a88502801e699ef99e72b7c625cd.tar.gz
TCE-1c7c106b06b6a88502801e699ef99e72b7c625cd.zip
Fixed some nasty bugs.
Diffstat (limited to 'src/kernel/mem/paging.cpp')
-rw-r--r--src/kernel/mem/paging.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/mem/paging.cpp b/src/kernel/mem/paging.cpp
index 8beee16..206cc08 100644
--- a/src/kernel/mem/paging.cpp
+++ b/src/kernel/mem/paging.cpp
@@ -38,8 +38,8 @@ void paging_init(size_t totalRam) {
uint32_t i;
frames.size = totalRam / 0x1000;
- frames.bits = (uint32_t*)ksbrk(INDEX_FROM_BIT(frames.size));
- memset(frames.bits, 0, INDEX_FROM_BIT(frames.size));
+ frames.bits = (uint32_t*)ksbrk(frames.mem_size());
+ memset(frames.bits, 0, frames.mem_size());
kernel_pagedir = (page_directory*)ksbrk(sizeof(page_directory));
kernel_pagedir->mappedSegs = 0;