summaryrefslogtreecommitdiff
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-08-21 14:08:32 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-08-21 14:08:32 +0000
commit88cf462fc30ceaa1493f9d58e47985cf0cd82112 (patch)
treed5dadbb69645f083ea50611e3973dcf6cf3a5431 /compiler/common_compiler_test.cc
parentc0dec2236b976794ff8f6cc3c2f41c36756ffaf9 (diff)
parentc34bebf39410f5571d3d5813157b61f274d435c3 (diff)
Merge "Remove unnecessary indirection from MemMap."
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index 87197becf9..2f017662e2 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -221,7 +221,7 @@ void CommonCompilerTest::TearDown() {
callbacks_.reset();
verification_results_.reset();
compiler_options_.reset();
- image_reservation_.reset();
+ image_reservation_.Reset();
CommonRuntimeTest::TearDown();
}
@@ -323,18 +323,18 @@ void CommonCompilerTest::ReserveImageSpace() {
// 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)120 * 1024 * 1024, // 120MB
- PROT_NONE,
- false /* no need for 4gb flag with fixed mmap*/,
- false /* not reusing existing reservation */,
- &error_msg));
- CHECK(image_reservation_.get() != nullptr) << error_msg;
+ image_reservation_ = MemMap::MapAnonymous("image reservation",
+ reinterpret_cast<uint8_t*>(ART_BASE_ADDRESS),
+ (size_t)120 * 1024 * 1024, // 120MB
+ PROT_NONE,
+ false /* no need for 4gb flag with fixed mmap */,
+ false /* not reusing existing reservation */,
+ &error_msg);
+ CHECK(image_reservation_.IsValid()) << error_msg;
}
void CommonCompilerTest::UnreserveImageSpace() {
- image_reservation_.reset();
+ image_reservation_.Reset();
}
void CommonCompilerTest::SetDexFilesForOatFile(const std::vector<const DexFile*>& dex_files) {