Create a scoped arena allocator and use that for LVN.
This saves more than 0.5s of boot.oat compilation time
on Nexus 5.
TODO: Move other stuff to the scoped allocator. This CL
alone increases the peak memory allocation. By reusing
the memory for other parts of the compilation we should
reduce this overhead.
Change-Id: Ifbc00aab4f3afd0000da818dfe68b96713824a08
diff --git a/compiler/utils/allocation.h b/compiler/utils/allocation.h
index 07cd397..b0947ca 100644
--- a/compiler/utils/allocation.h
+++ b/compiler/utils/allocation.h
@@ -26,7 +26,7 @@
public:
// Allocate a new ArenaObject of 'size' bytes in the Arena.
void* operator new(size_t size, ArenaAllocator* allocator) {
- return allocator->Alloc(size, ArenaAllocator::kAllocMisc);
+ return allocator->Alloc(size, kArenaAllocMisc);
}
void operator delete(void*, size_t) {