diff options
| author | Kostya Serebryany <kcc@google.com> | 2012-11-24 05:03:11 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2012-11-24 05:03:11 +0000 |
| commit | df198db1aacd23b4ae82bd64a98d227751ef1d5d (patch) | |
| tree | e251bf36961c3c224ae9c4d6e5f854487a0be34c /compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc | |
| parent | cc0c74a76c7455eb14d85410f03e29b94c25afcc (diff) | |
| download | bcm5719-llvm-df198db1aacd23b4ae82bd64a98d227751ef1d5d.tar.gz bcm5719-llvm-df198db1aacd23b4ae82bd64a98d227751ef1d5d.zip | |
[asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms
llvm-svn: 168537
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc index 985f91a103e..c43933061f1 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc @@ -63,7 +63,7 @@ void *LowLevelAllocator::Allocate(uptr size) { // Align allocation size. size = RoundUpTo(size, 8); if (allocated_end_ - allocated_current_ < (sptr)size) { - uptr size_to_allocate = Max(size, kPageSize); + uptr size_to_allocate = Max(size, GetPageSizeCached()); allocated_current_ = (char*)MmapOrDie(size_to_allocate, __FUNCTION__); allocated_end_ = allocated_current_ + size_to_allocate; |

