From: Andreas Gampe Date: Mon, 12 Sep 2016 22:55:56 +0000 (-0700) Subject: ART: Remove unnecessary file from vdex X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f7e8223ee7ec7bdadf1fc60fcee16efa53ddaceb;p=android-x86%2Fart.git ART: Remove unnecessary file from vdex Don't store the file. The mem-map works without it. Test: m Test: m test-art-host Test: device boots Bug: 30937355 Bug: 31439377 Change-Id: Ie9579062c20ddd8dcfc612ccb614f0a0553d4fd9 --- diff --git a/runtime/vdex_file.cc b/runtime/vdex_file.cc index 12bc45108..a71578b1c 100644 --- a/runtime/vdex_file.cc +++ b/runtime/vdex_file.cc @@ -19,6 +19,7 @@ #include #include "base/logging.h" +#include "base/unix_file/fd_file.h" namespace art { @@ -81,7 +82,7 @@ VdexFile* VdexFile::Open(const std::string& vdex_filename, } *error_msg = "Success"; - return new VdexFile(vdex_file.release(), mmap.release()); + return new VdexFile(mmap.release()); } } // namespace art diff --git a/runtime/vdex_file.h b/runtime/vdex_file.h index e381eb79c..9215e52b0 100644 --- a/runtime/vdex_file.h +++ b/runtime/vdex_file.h @@ -21,7 +21,6 @@ #include #include "base/macros.h" -#include "base/unix_file/fd_file.h" #include "mem_map.h" #include "os.h" @@ -66,9 +65,8 @@ class VdexFile { size_t Size() const { return mmap_->Size(); } private: - VdexFile(File* file, MemMap* mmap) : file_(file), mmap_(mmap) {} + explicit VdexFile(MemMap* mmap) : mmap_(mmap) {} - std::unique_ptr file_; std::unique_ptr mmap_; DISALLOW_COPY_AND_ASSIGN(VdexFile);