all repos — mgba @ 4da65d0f2f041e2db4874087e1e0d8da5a2d96be

mGBA Game Boy Advance Emulator

src/platform/windows/memory.c (view raw)

 1#include "util/memory.h"
 2
 3#include <Windows.h>
 4
 5void* anonymousMemoryMap(size_t size) {
 6	return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
 7}
 8
 9void mappedMemoryFree(void* memory, size_t size) {
10	UNUSED(size);
11	// size is not useful here because we're freeing the memory, not decommitting it
12	VirtualFree(memory, 0, MEM_RELEASE);
13}