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");