diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-12-11 21:03:12 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-12-11 21:03:12 +0000 |
commit | 9b3f7c3d180b156605b9def01ce16465baee9c1c (patch) | |
tree | f6e94828c40d26da2e6c00a47a5f041ddca3e31b /lib/scudo/scudo_allocator.cpp | |
parent | 313d4281293b9be28bc0a6af624c4729e4faae21 (diff) |
[sanitizer] Revert rL320409
Summary: D40679 broke a couple of builds, reverting while investigating.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: srhines, kubamracek, krytarowski, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D41088
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/scudo_allocator.cpp')
-rw-r--r-- | lib/scudo/scudo_allocator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/scudo/scudo_allocator.cpp b/lib/scudo/scudo_allocator.cpp index 847a244c6..6383c6819 100644 --- a/lib/scudo/scudo_allocator.cpp +++ b/lib/scudo/scudo_allocator.cpp @@ -301,7 +301,7 @@ struct ScudoAllocator { CheckRssLimit = HardRssLimitMb || SoftRssLimitMb; if (CheckRssLimit) - atomic_store_relaxed(&RssLastCheckedAtNS, MonotonicNanoTime()); + atomic_store_relaxed(&RssLastCheckedAtNS, NanoTime()); } // Helper function that checks for a valid Scudo chunk. nullptr isn't. @@ -319,7 +319,7 @@ struct ScudoAllocator { // it can, every 100ms, otherwise it will just return the current one. bool isRssLimitExceeded() { u64 LastCheck = atomic_load_relaxed(&RssLastCheckedAtNS); - const u64 CurrentCheck = MonotonicNanoTime(); + const u64 CurrentCheck = NanoTime(); if (LIKELY(CurrentCheck < LastCheck + (100ULL * 1000000ULL))) return atomic_load_relaxed(&RssLimitExceeded); if (!atomic_compare_exchange_weak(&RssLastCheckedAtNS, &LastCheck, |