Fix Windows errors
This commit is contained in:
parent
389a494bfc
commit
dd512f8304
@ -33,7 +33,7 @@ static u64 ReadOSTimer(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static u64 ReadOSPageFaultCount(void) {
|
static u64 ReadOSPageFaultCount(void) {
|
||||||
PROCESS_MEMORY_COUNTERS_EX MemoryCounters = {};
|
PROCESS_MEMORY_COUNTERS_EX MemoryCounters = {0};
|
||||||
MemoryCounters.cb = sizeof(MemoryCounters);
|
MemoryCounters.cb = sizeof(MemoryCounters);
|
||||||
GetProcessMemoryInfo(GlobalMetrics.ProcessHandle,
|
GetProcessMemoryInfo(GlobalMetrics.ProcessHandle,
|
||||||
(PROCESS_MEMORY_COUNTERS *)&MemoryCounters,
|
(PROCESS_MEMORY_COUNTERS *)&MemoryCounters,
|
||||||
@ -127,7 +127,7 @@ int main(int argc, char *argv[]) {
|
|||||||
((long long)faults - touch_count));
|
((long long)faults - touch_count));
|
||||||
|
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
VirtualFree(Data, 0, MEM_RELEASE);
|
VirtualFree(data, 0, MEM_RELEASE);
|
||||||
#else
|
#else
|
||||||
munmap((void *)data, alloc_size);
|
munmap((void *)data, alloc_size);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user