From 579ea7d0d89a1d7f02c35ef1beb6328a37259735 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 24 Mar 2015 17:28:38 +0000 Subject: Share the runtime arena for faster compile times. Using a shared arena has the downside of getting more contentions when requesting memory, but saves on compilation times because we don't free the memory it allocated util the end of dex2oat. Change-Id: I353ced1db34539850ec639b6b228451b455a48ec --- compiler/optimizing/optimizing_compiler.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 933a8a005c..f5d65989db 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -477,8 +477,7 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite class_def_idx, method_idx, access_flags, compiler_driver->GetVerifiedMethod(&dex_file, method_idx)); - ArenaPool pool; - ArenaAllocator arena(&pool); + ArenaAllocator arena(Runtime::Current()->GetArenaPool()); HGraph* graph = new (&arena) HGraph( &arena, compiler_driver->GetCompilerOptions().GetDebuggable()); -- cgit v1.2.3-59-g8ed1b