Fix Windows errors

This commit is contained in:
Abdelrahman Said 2023-09-24 18:48:51 +01:00
parent 389a494bfc
commit dd512f8304

View File

@ -33,7 +33,7 @@ static u64 ReadOSTimer(void) {
}
static u64 ReadOSPageFaultCount(void) {
PROCESS_MEMORY_COUNTERS_EX MemoryCounters = {};
PROCESS_MEMORY_COUNTERS_EX MemoryCounters = {0};
MemoryCounters.cb = sizeof(MemoryCounters);
GetProcessMemoryInfo(GlobalMetrics.ProcessHandle,
(PROCESS_MEMORY_COUNTERS *)&MemoryCounters,
@ -127,7 +127,7 @@ int main(int argc, char *argv[]) {
((long long)faults - touch_count));
#if _WIN32
VirtualFree(Data, 0, MEM_RELEASE);
VirtualFree(data, 0, MEM_RELEASE);
#else
munmap((void *)data, alloc_size);
#endif