aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/RallocUtil.c
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2010-04-23 16:34:52 -0700
committerKenny Root <kroot@google.com>2010-05-06 14:26:02 -0700
commit80a4e2497c3b5ef24fe1408c678053fbc6cd4b25 (patch)
tree98c348c0c35ef7ce4442b50dd65b48e610c1ea72 /vm/compiler/codegen/arm/RallocUtil.c
parentf6cd559ad0d1df42da5b8f2acf926a0ed51da1a3 (diff)
Dalvik Zip rewrite.
Change the way zip archives are handled. This is necessary to deal with very large (~1GB) APK files, for which our current approach of mapping the entire file falls over. We now do the classic scavenger hunt for the End Of Central Directory magic on a buffer of data read from the file, instead of a memory-mapped section. We use what we find to create a map that covers the Central Directory only. For most uses in the VM this is all we really need, since we just want to check file attributes vs. the optimized DEX to see if we're out of date. If the caller is interested in unpacking the file contents, we have to do an additional file read to discover the size of the Local File Header section so we can skip past it. We also now do a file-to-file extraction using read() calls instead of a buffer-to-file extraction on mmap()ed data. No difference in performance (as measured by first-boot dexopt). Since this is more of a rewrite than an update, I also took the opportunity to change buffer size variables from "long" to "size_t", and normalized return values to int (some were using bool, which is common in the VM but was mixed in the zip code). Failure messages are now all LOGW with the word "Zip" up front (didn't want to change log tag away from "dalvikvm"). Also, removed a not-quite-right check in the "map part of a file" code, and clarified that the file offset is absolute. For bug 2620103. Change-Id: I745fb15abb541376f467969ffe422222676f1e5f
Diffstat (limited to 'vm/compiler/codegen/arm/RallocUtil.c')
0 files changed, 0 insertions, 0 deletions