MCPcopy Create free account
hub / github.com/cemu-project/Cemu / OSUnmapMemory

Function OSUnmapMemory

src/Cafe/OS/libs/coreinit/coreinit_MemoryMapping.cpp:141–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 uint32 OSUnmapMemory(MPTR virtualAddress, uint32 size)
142 {
143 if (virtualAddress < VIRT_RANGE_ADDR || virtualAddress >= (VIRT_RANGE_ADDR + VIRT_RANGE_SIZE))
144 cemu_assert_suspicious();
145
146 cemu_assert((size % MemMapper::GetPageSize()) == 0);
147
148 uint8* virtualPtr = memory_getPointerFromVirtualOffset(virtualAddress);
149
150 MemMapper::FreeMemory(virtualPtr, size, true);
151 return 1;
152 }
153
154 void InitializeMemoryMapping()
155 {

Callers

nothing calls this directly

Calls 5

cemu_assert_suspiciousFunction · 0.85
cemu_assertFunction · 0.85
GetPageSizeFunction · 0.50
FreeMemoryFunction · 0.50

Tested by

no test coverage detected