[llvm-commits] [compiler-rt] r168426 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
Kostya Serebryany
kcc at google.com
Wed Nov 21 05:31:07 PST 2012
Author: kcc
Date: Wed Nov 21 07:31:07 2012
New Revision: 168426
URL: http://llvm.org/viewvc/llvm-project?rev=168426&view=rev
Log:
[asan] get rid of kPageSizeBits
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=168426&r1=168425&r2=168426&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Wed Nov 21 07:31:07 2012
@@ -29,18 +29,15 @@
// We may want to use getpagesize() or sysconf(_SC_PAGESIZE) here rather than
// hardcoding the values, but today these values need to be compile-time
// constants.
-const uptr kPageSizeBits = 16;
-const uptr kPageSize = 1UL << kPageSizeBits;
+const uptr kPageSize = 1UL << 16;
const uptr kCacheLineSize = 128;
const uptr kMmapGranularity = kPageSize;
#elif !defined(_WIN32)
-const uptr kPageSizeBits = 12;
-const uptr kPageSize = 1UL << kPageSizeBits;
+const uptr kPageSize = 1UL << 12;
const uptr kCacheLineSize = 64;
const uptr kMmapGranularity = kPageSize;
#else
-const uptr kPageSizeBits = 12;
-const uptr kPageSize = 1UL << kPageSizeBits;
+const uptr kPageSize = 1UL << 12;
const uptr kCacheLineSize = 64;
const uptr kMmapGranularity = 1UL << 16;
#endif
More information about the llvm-commits
mailing list