History log of /dalvik/vm/DvmDex.cpp
Revision Date Author Comments
5bac60aaafca855f68e1f8b5527d4a4b7897f234 15-Feb-2012 Iliyan Malchev <malchev@google.com> Replace large calloc() with ashmem-backed anonymous mmap

This change eliminates a large amount of memory duplication arising from the
use of a calloc() to initialize auxiliary data structures. Calloc() calls
memset() to zero out memory after it has been allocated. That memory may
either be gotten via an anonymous mmap (in which case the memset() is
unnecessary, as the kernel zeros out the memory before handing it to user
space), or it can get recycled by the heap (in which case the memset() is
necessary.)

This becomes a problem for large callocs in any case. In addition, when
initializing aux structures, we create a large sparse array for each DEX file.
The data in each array tends to remain mostly zeroed out, which leads to a lot
of duplicated zero pages.

By switching to anonymous mmaps() instead of calloc(), we keep the zeroed-out
pages together and minimize duplication.

Change-Id: Ic38b78e54acc782a863513a7b1972492e50e099c
Signed-off-by: Iliyan Malchev <malchev@google.com>
c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Also fix an occurrence of LOGW missed in an earlier change.

Bug: 5449033
Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
062bf509a77fce9dfcb7e7b2e401cf2a124d83d5 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: Ic663376d1ad6a6cb14bf81405ad9afd247cf2f60
92c1f6f1b4249e4e379452ee7b49f027052bf4ce 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I8bd96961e369a08e86ff78b82d90f20f42787eb1
60fc806b679a3655c228b4093058c59941a49cfe 26-May-2011 Dan Bornstein <danfuzz@android.com> Further conservation of newlines.

Friends don't let friends end LOG() strings with newlines.

Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
d5c36b9040bd26a81219a7f399513526f9b46324 16-Apr-2011 Carl Shapiro <cshapiro@google.com> Move the remaining non-compiler VM code into C++.

Change-Id: Id8693208d2741c55a7b0474d1264f2112019d11f