summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-09-12 15:55:56 -0700
committer Andreas Gampe <agampe@google.com> 2016-09-12 16:25:26 -0700
commitf7e8223ee7ec7bdadf1fc60fcee16efa53ddaceb (patch)
treea28ce2615850c10bb7208ebd6e4a4b397286ae90
parentf0c41505e1d241cf2191d3db377a26ce0bb43b51 (diff)
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
-rw-r--r--runtime/vdex_file.cc3
-rw-r--r--runtime/vdex_file.h4
2 files changed, 3 insertions, 4 deletions
diff --git a/runtime/vdex_file.cc b/runtime/vdex_file.cc
index 12bc45108e..a71578b1c3 100644
--- a/runtime/vdex_file.cc
+++ b/runtime/vdex_file.cc
@@ -19,6 +19,7 @@
#include <memory>
#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 e381eb79ca..9215e52b07 100644
--- a/runtime/vdex_file.h
+++ b/runtime/vdex_file.h
@@ -21,7 +21,6 @@
#include <string>
#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> file_;
std::unique_ptr<MemMap> mmap_;
DISALLOW_COPY_AND_ASSIGN(VdexFile);