From 92ffe2fb3948d0bb6aa1b01894af02ba88b145d6 Mon Sep 17 00:00:00 2001 From: ergo720 Date: Sun, 26 Aug 2018 19:47:48 +0200 Subject: [PATCH] Count reserved bytes by the xbe image too --- src/CxbxKrnl/VMManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CxbxKrnl/VMManager.cpp b/src/CxbxKrnl/VMManager.cpp index 0d509ce20..e7ee0b97d 100644 --- a/src/CxbxKrnl/VMManager.cpp +++ b/src/CxbxKrnl/VMManager.cpp @@ -155,7 +155,8 @@ void VMManager::Initialize(HANDLE memory_view, HANDLE pagetables_view, int BootF InitializePageDirectory(); // Reserve the xbe image memory. Doing this now allows us to avoid calling XbAllocateVirtualMemory later - ConstructVMA(XBE_IMAGE_BASE, ROUND_UP_4K(CxbxKrnl_Xbe->m_Header.dwSizeofImage), UserRegion, ReservedVma, false, XBOX_PAGE_READWRITE); + ConstructVMA(XBE_IMAGE_BASE, ROUND_UP_4K(CxbxKrnl_Xbe->m_Header.dwSizeofImage), UserRegion, ReservedVma, false, XBOX_PAGE_READWRITE); + m_VirtualMemoryBytesReserved += ROUND_UP_4K(CxbxKrnl_Xbe->m_Header.dwSizeofImage); if (m_MmLayoutChihiro) { printf("Page table for Chihiro arcade initialized!\n");