Index: lib/sanitizer_common/sanitizer_flags.inc =================================================================== --- lib/sanitizer_common/sanitizer_flags.inc +++ lib/sanitizer_common/sanitizer_flags.inc @@ -132,7 +132,8 @@ " This limit does not affect memory allocations other than" " malloc/new.") COMMON_FLAG(bool, heap_profile, false, "Experimental heap profiler, asan-only") -COMMON_FLAG(s32, allocator_release_to_os_interval_ms, 5000, +COMMON_FLAG(s32, allocator_release_to_os_interval_ms, + (SANITIZER_FUCHSIA || SANITIZER_WINDOWS) ? -1 : 5000, "Only affects a 64-bit allocator. If set, tries to release unused " "memory to the OS, but not more often than this interval (in " "milliseconds). Negative values mean do not attempt to release " Index: lib/sanitizer_common/sanitizer_win.cc =================================================================== --- lib/sanitizer_common/sanitizer_win.cc +++ lib/sanitizer_common/sanitizer_win.cc @@ -502,12 +502,19 @@ } u64 NanoTime() { - return 0; + static LARGE_INTEGER frequency = {0}; + LARGE_INTEGER counter; + if (UNLIKELY(frequency.QuadPart == 0)) { + QueryPerformanceFrequency(&frequency); + CHECK_NE(frequency.QuadPart, 0); + } + QueryPerformanceCounter(&counter); + counter.QuadPart *= 1000ULL * 1000000ULL; + counter.QuadPart /= frequency.QuadPart; + return counter.QuadPart; } -u64 MonotonicNanoTime() { - return 0; -} +u64 MonotonicNanoTime() { return NanoTime(); } void Abort() { internal__exit(3);