summaryrefslogtreecommitdiffstats
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-10-14 15:01:24 -0700
committerMathieu Chartier <mathieuc@google.com>2014-10-14 15:43:21 -0700
commit6e88ef6b604a7a945a466784580c42e6554c1289 (patch)
tree1e296564787b51514cf2eca5b732647c1a82912e /compiler/common_compiler_test.cc
parent58e51f38e2304a08aa9ec380383e0b3614f96a96 (diff)
downloadandroid_art-6e88ef6b604a7a945a466784580c42e6554c1289.tar.gz
android_art-6e88ef6b604a7a945a466784580c42e6554c1289.tar.bz2
android_art-6e88ef6b604a7a945a466784580c42e6554c1289.zip
Change MemMap::maps_ to not be global variable
Runtime.exit() was causing globals to get destructed at the same time that another thread was using it for allocating a new mem map. Bug: 17962201 Change-Id: I400cb7b8141d858f3c08a6fe59a02838c04c6962
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index e3eb9e9915..d1d47fb361 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -397,6 +397,7 @@ void CommonCompilerTest::ReserveImageSpace() {
// Reserve where the image will be loaded up front so that other parts of test set up don't
// accidentally end up colliding with the fixed memory address when we need to load the image.
std::string error_msg;
+ MemMap::Init();
image_reservation_.reset(MemMap::MapAnonymous("image reservation",
reinterpret_cast<uint8_t*>(ART_BASE_ADDRESS),
(size_t)100 * 1024 * 1024, // 100MB