summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_allocator.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2013-02-04 08:07:45 +0000
committerDmitry Vyukov <dvyukov@google.com>2013-02-04 08:07:45 +0000
commit8ceeec4f343768b199e7c891865029360b7225dc (patch)
treedb7b105bd3f73b16311fe006ed1c6da48938b5ab /lib/sanitizer_common/sanitizer_allocator.h
parent52c70e5818727521b89f7fc95a2a383df8985ca6 (diff)
downloadcompiler-rt-8ceeec4f343768b199e7c891865029360b7225dc.tar.gz
compiler-rt-8ceeec4f343768b199e7c891865029360b7225dc.tar.bz2
compiler-rt-8ceeec4f343768b199e7c891865029360b7225dc.tar.xz
asan/tsan: fix compilation errors/bugs on Windows where long is 32-bit even in 64-bit mode
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_allocator.h')
-rw-r--r--lib/sanitizer_common/sanitizer_allocator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_allocator.h b/lib/sanitizer_common/sanitizer_allocator.h
index 9d881210..a9082508 100644
--- a/lib/sanitizer_common/sanitizer_allocator.h
+++ b/lib/sanitizer_common/sanitizer_allocator.h
@@ -116,7 +116,7 @@ class SizeClassMap {
static uptr MaxCached(uptr class_id) {
if (class_id == 0) return 0;
uptr n = (1UL << kMaxBytesCachedLog) / Size(class_id);
- return Max(1UL, Min(kMaxNumCached, n));
+ return Max<uptr>(1, Min(kMaxNumCached, n));
}
static void Print() {