From c34bebf39410f5571d3d5813157b61f274d435c3 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 16 Aug 2018 16:12:49 +0100 Subject: Remove unnecessary indirection from MemMap. Avoid plain MemMap pointers being passed around by changing the MemMap to moveable and return MemMap objects by value. Previously we could have a valid zero-size MemMap but this is now forbidden. MemMap::RemapAtEnd() is changed to avoid the explicit call to munmap(); mmap() with MAP_FIXED automatically removes old mappings for overlapping regions. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Change-Id: I12bd453c26a396edc20eb141bfd4dad20923f170 --- compiler/common_compiler_test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/common_compiler_test.h') diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h index db38110400..366489c58f 100644 --- a/compiler/common_compiler_test.h +++ b/compiler/common_compiler_test.h @@ -115,7 +115,7 @@ class CommonCompilerTest : public CommonRuntimeTest { std::unique_ptr compiler_driver_; private: - std::unique_ptr image_reservation_; + MemMap image_reservation_; // Chunks must not move their storage after being created - use the node-based std::list. std::list> header_code_and_maps_chunks_; -- cgit v1.2.3-59-g8ed1b