Decrease lock uses in RosAlloc::BulkFree().
Read rosalloc page map entries without a lock.
Disabled for now.
This change speeds up Ritz MemAllocTest by ~25% on host and reduces
the GC sweep time, but somehow slows it down by ~5% on N4, which is
why it's disabled for now. TODO: look into the slowdown on N4 more.
Bug: 8262791
Bug: 11790317
Change-Id: I936bbee9cfbd389e70d6343503bf0923865d2a2c
diff --git a/runtime/gc/space/rosalloc_space.h b/runtime/gc/space/rosalloc_space.h
index 5bc425d..9f756aa 100644
--- a/runtime/gc/space/rosalloc_space.h
+++ b/runtime/gc/space/rosalloc_space.h
@@ -114,11 +114,11 @@
size_t* usable_size);
void* CreateAllocator(void* base, size_t morecore_start, size_t initial_size,
- bool low_memory_mode) OVERRIDE {
- return CreateRosAlloc(base, morecore_start, initial_size, low_memory_mode);
+ size_t maximum_size, bool low_memory_mode) OVERRIDE {
+ return CreateRosAlloc(base, morecore_start, initial_size, maximum_size, low_memory_mode);
}
static allocator::RosAlloc* CreateRosAlloc(void* base, size_t morecore_start, size_t initial_size,
- bool low_memory_mode);
+ size_t maximum_size, bool low_memory_mode);
void InspectAllRosAlloc(void (*callback)(void *start, void *end, size_t num_bytes, void* callback_arg),
void* arg)