summaryrefslogtreecommitdiff
path: root/include/ScopedJavaUnicodeString.h
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2010-04-23 16:34:52 -0700
committerAndy McFadden <fadden@android.com>2010-04-29 10:34:30 -0700
commit99c4f9c7d8bf75dce02e2284cbc4c8904ce3852c (patch)
treee71d43da21749bfeb4524b0adec05c91d1f89a5f /include/ScopedJavaUnicodeString.h
parentcec4dd4b1d33f78997603d0f89c0d0e56e64dbcd (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 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions