Add support for opening classes.dex file from zip, jar, apk
Adding new ZipArchive class and test
src/zip_archive.h
src/zip_archive.cc
src/zip_archive_test.cc
build/Android.common.mk
Change from host only use of build dex file for libcore to using host
and target core.jar containing classes.dex files. This requires
setting up an ANDROID_DATA directory to containing an art-cache file
for the extracted dex files, similar to the dalvik-cache for odex
files. A unique ANDROID_DATA and art-cache is created and cleaned up
for each test run (similar to vogar).
src/common_test.h
Add dependency for libcore jar files to test targets to support
RuntimeTest use of core.jar
Android.mk
Extract common includes to ART_C_INCLUDES when adding zlib dependency
build/Android.common.mk
build/Android.libart.mk
build/Android.test.mk
Adding TODO regarding unordered map for ClassLinker::classes_ table.
src/class_linker.h
Adding DexFile::OpenZip (also changed OpenFile to take
src/dex_file.cc
src/dex_file.h
Adding kPageSize of 4096, validated by Runtime::Init
src/globals.h
src/runtime.cc
Updated to use kPageSize where it seemed appropriate.
src/jni_compiler.cc
src/jni_compiler_test.cc
src/space.cc
src/thread.cc
src/thread_x86.cc
Changed thread_list_ and class_linker_ to be declared in Runtime::Init
initialization order.
src/runtime.h
Change-Id: Id626abe5b6c1990e4f93598256ee0fae000818f6
diff --git a/src/jni_compiler.cc b/src/jni_compiler.cc
index 5b57e71..8433c27 100644
--- a/src/jni_compiler.cc
+++ b/src/jni_compiler.cc
@@ -368,7 +368,7 @@
JniCompiler::JniCompiler() {
// TODO: this shouldn't be managed by the JniCompiler, we should have a
// code cache.
- jni_code_size_ = 4096;
+ jni_code_size_ = kPageSize;
jni_code_ = static_cast<byte*>(mmap(NULL, jni_code_size_,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0));