summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/asan/asan_allocator.h2
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_allocator.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h
index 093b605e4b8..bc0419cf963 100644
--- a/compiler-rt/lib/asan/asan_allocator.h
+++ b/compiler-rt/lib/asan/asan_allocator.h
@@ -23,7 +23,7 @@
// to a new one (version 2). The change is quite intrusive so both allocators
// will co-exist in the source base for a while. The actual allocator is chosen
// at build time by redefining this macrozz.
-#define ASAN_ALLOCATOR_VERSION 1
+#define ASAN_ALLOCATOR_VERSION 2
namespace __asan {
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h
index 2e9de2113c0..22df12f7fd2 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h
@@ -238,14 +238,14 @@ class SizeClassAllocator64 {
Batch *b = region->free_list.Pop();
if (b == 0)
b = PopulateFreeList(c, class_id, region);
- region->n_allocated++;
+ region->n_allocated += b->count;
return b;
}
void NOINLINE DeallocateBatch(uptr class_id, Batch *b) {
RegionInfo *region = GetRegionInfo(class_id);
region->free_list.Push(b);
- region->n_freed++;
+ region->n_freed += b->count;
}
static bool PointerIsMine(void *p) {
OpenPOWER on IntegriCloud