diff options
author | 2015-09-08 13:47:48 +0100 | |
---|---|---|
committer | 2015-10-15 16:46:41 +0100 | |
commit | 09d0943f5efe92c1f3a6b9dbdf255adb0f960a22 (patch) | |
tree | 7521bf5eefaa84f1cd18c2d601ac0891cc1598a5 /runtime/class_linker.cc | |
parent | 644044333f5f6d7ba7e327619ac0d0ce4e2609d3 (diff) |
ART: Use .bss section for dex cache arrays.
Change-Id: I5fd507973b56f6a662a02a8c1dd9ac4493fb7b36
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 02f2e0b207..c91577a7ac 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -1204,7 +1204,10 @@ mirror::DexCache* ClassLinker::AllocDexCache(Thread* self, const DexFile& dex_fi } DexCacheArraysLayout layout(image_pointer_size_, &dex_file); uint8_t* raw_arrays = nullptr; - if (dex_file.NumStringIds() != 0u || dex_file.NumTypeIds() != 0u || + if (dex_file.GetOatDexFile() != nullptr && + dex_file.GetOatDexFile()->GetDexCacheArrays() != nullptr) { + raw_arrays = const_cast<uint8_t*>(dex_file.GetOatDexFile()->GetDexCacheArrays()); + } else if (dex_file.NumStringIds() != 0u || dex_file.NumTypeIds() != 0u || dex_file.NumMethodIds() != 0u || dex_file.NumFieldIds() != 0u) { // NOTE: We "leak" the raw_arrays because we never destroy the dex cache. DCHECK(image_pointer_size_ == 4u || image_pointer_size_ == 8u); |