Add getters for free, used and reserved memory
This commit is contained in:
parent
6a7097c9ec
commit
3358454833
@ -98,10 +98,6 @@ namespace MemoryManager
|
||||
lock_pages((u64)page_bitmap_addr, page_bitmap_size / MMU::page_size() + 1);
|
||||
}
|
||||
|
||||
void protect_kernel_sections()
|
||||
{
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
init_physical_allocator();
|
||||
@ -148,4 +144,19 @@ namespace MemoryManager
|
||||
if (start_index > index) start_index = index;
|
||||
return {};
|
||||
}
|
||||
|
||||
u64 free()
|
||||
{
|
||||
return free_mem;
|
||||
}
|
||||
|
||||
u64 used()
|
||||
{
|
||||
return used_mem;
|
||||
}
|
||||
|
||||
u64 reserved()
|
||||
{
|
||||
return reserved_mem;
|
||||
}
|
||||
}
|
@ -11,4 +11,8 @@ namespace MemoryManager
|
||||
|
||||
void lock_page(u64 page);
|
||||
void lock_pages(u64 pages, u64 count);
|
||||
|
||||
u64 free();
|
||||
u64 used();
|
||||
u64 reserved();
|
||||
}
|
Loading…
Reference in New Issue
Block a user