summaryrefslogtreecommitdiffstats
path: root/runtime/gc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-06-26 16:11:07 -0700
committerAndreas Gampe <agampe@google.com>2014-07-08 12:14:38 -0700
commitc87d27b25994da8670d82a8f7bad6327b693bfff (patch)
treee8ad0fa224f050c5c3e3e30ccdc0912f28650f42 /runtime/gc
parente8a30f37bf1530a80a7df17692dbe7a68764ac30 (diff)
downloadart-c87d27b25994da8670d82a8f7bad6327b693bfff.zip
art-c87d27b25994da8670d82a8f7bad6327b693bfff.tar.gz
art-c87d27b25994da8670d82a8f7bad6327b693bfff.tar.bz2
ART: Key-Value Store in Oat header
Allows the storage of string-string pairs in the oat header. The first significant use of this is storing the implicit-check flags, so that an oat file can be rejected if it doesn't agree with the current runtime. Bump the oat version as the header structure changes. Change-Id: I15a1c16886e6b8fa7b881c918c19c1efa5c7c00f
Diffstat (limited to 'runtime/gc')
-rw-r--r--runtime/gc/space/image_space.cc4
-rw-r--r--runtime/gc/space/image_space.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 61633cd..891ace8 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -348,6 +348,10 @@ bool ImageSpace::ValidateOatFile(std::string* error_msg) const {
return true;
}
+const OatFile* ImageSpace::GetOatFile() const {
+ return oat_file_.get();
+}
+
OatFile* ImageSpace::ReleaseOatFile() {
CHECK(oat_file_.get() != NULL);
return oat_file_.release();
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index 372db3a..dd9b580 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -51,6 +51,9 @@ class ImageSpace : public MemMapSpace {
static ImageHeader* ReadImageHeaderOrDie(const char* image_location,
InstructionSet image_isa);
+ // Give access to the OatFile.
+ const OatFile* GetOatFile() const;
+
// Releases the OatFile from the ImageSpace so it can be transfer to
// the caller, presumably the ClassLinker.
OatFile* ReleaseOatFile()