This commit is contained in:
Daniel Ledda
2025-01-11 13:12:22 +01:00
parent d7c3bb4868
commit 54ef57b90f
14 changed files with 2543 additions and 235 deletions

21
djstdlib/os_win32.cpp Normal file
View File

@@ -0,0 +1,21 @@
#ifndef OS_IMPL_WIN32_CPP
#define OS_IMPL_WIN32_CPP
#include "os.h"
#include "Windows.h"
void *os_alloc(size_t commitSize) {
return VirtualAlloc(NULL, commitSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
}
void os_reserve(void *ptr) {
}
void os_decommit(void *ptr) {
}
void os_free(void *ptr, size_t size) {
VirtualFree(ptr, NULL, MEM_RELEASE);
}
#endif