Implement vm::find_map; improve memory allocation

Add vm::user64k and vm::user1m constants
Remove vm::user_space, unreserve it
This commit is contained in:
Nekotekina 2018-08-13 19:15:56 +03:00
parent 9578e1e923
commit aa4040bb7b
10 changed files with 139 additions and 67 deletions

View file

@ -63,14 +63,14 @@ void kernel_explorer::Update()
{
m_tree->clear();
const auto vm_block = vm::get(vm::user_space);
const auto dct = fxm::get_always<lv2_memory_container>();
if (!vm_block)
if (!dct)
{
return;
}
const u32 total_memory_usage = vm_block->used();
const u32 total_memory_usage = dct->used;
QTreeWidgetItem* root = new QTreeWidgetItem();
root->setText(0, qstr(fmt::format("Process, ID = 0x00000001, Total Memory Usage = 0x%x (%0.2f MB)", total_memory_usage, (float)total_memory_usage / (1024 * 1024))));