summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/tests
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-03-12 08:44:40 +0000
committerKostya Serebryany <kcc@google.com>2013-03-12 08:44:40 +0000
commit138b155042a03bff7d460657cf89a8e0da66234c (patch)
tree098610003728dc480930a8a3dce9acf65d3d5ff3 /compiler-rt/lib/sanitizer_common/tests
parent26d5bc7fdf7f936d813d015963275d29a783c42a (diff)
downloadbcm5719-llvm-138b155042a03bff7d460657cf89a8e0da66234c.tar.gz
bcm5719-llvm-138b155042a03bff7d460657cf89a8e0da66234c.zip
[sanitizer] use fewer size classes in the allocator to reduce the memory footprint. There is no all-size-fits-all constant here, but this change is positive or neutral on several large apps I've tested
llvm-svn: 176855
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/tests')
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
index 0e0d9a90e48..40cf8a5190b 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
@@ -203,7 +203,7 @@ TEST(SanitizerCommon, SizeClassAllocator64MapUnmapCallback) {
cache.Init(0);
AllocatorStats stats;
stats.Init();
- a->AllocateBatch(&stats, &cache, 64);
+ a->AllocateBatch(&stats, &cache, 32);
EXPECT_EQ(TestMapUnmapCallback::map_count, 3); // State + alloc + metadata.
a->TestOnlyUnmap();
EXPECT_EQ(TestMapUnmapCallback::unmap_count, 1); // The whole thing.
@@ -225,7 +225,7 @@ TEST(SanitizerCommon, SizeClassAllocator32MapUnmapCallback) {
cache.Init(0);
AllocatorStats stats;
stats.Init();
- a->AllocateBatch(&stats, &cache, 64);
+ a->AllocateBatch(&stats, &cache, 32);
EXPECT_EQ(TestMapUnmapCallback::map_count, 2); // alloc.
a->TestOnlyUnmap();
EXPECT_EQ(TestMapUnmapCallback::unmap_count, 2); // The whole thing + alloc.
@@ -258,7 +258,7 @@ void FailInAssertionOnOOM() {
AllocatorStats stats;
stats.Init();
for (int i = 0; i < 1000000; i++) {
- a.AllocateBatch(&stats, &cache, 64);
+ a.AllocateBatch(&stats, &cache, 52);
}
a.TestOnlyUnmap();
OpenPOWER on IntegriCloud