1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-23 18:06:20 +04:00

Updates to pages

This commit is contained in:
Stephen Marz 2019-11-03 21:26:39 -05:00
parent 6cc5cba4b8
commit 6cbf12ada9

View File

@ -243,7 +243,7 @@ pub fn dealloc(ptr: *mut u8) {
/// This is mainly used for debugging.
pub fn print_page_allocations() {
unsafe {
let num_pages = HEAP_SIZE / PAGE_SIZE;
let num_pages = (HEAP_SIZE - (ALLOC_START - HEAP_START)) / PAGE_SIZE;
let mut beg = HEAP_START as *const Page;
let end = beg.add(num_pages);
let alloc_beg = ALLOC_START;