Prevent memory fragmentation.

	Bug: 5817320

Prevent memory fragmentation and potential allocation failures. This
change is temporary.

Change-Id: Id1e8f9606687648235ea9e18861125a8c799d812
fix personality call.

Change-Id: I25845344494ac15b4a6876784d2b040779892459
merge in ics-mr1-release history after reset to ics-mr1
Bug fix for control-flow construction involving nested loops.

Bug: 5884080
Change-Id: Ic2f42abae3e71f9c0729984902396f92902184a3
merge in ics-mr1-release history after reset to ics-mr1
Fix to dex verifier to handle float types that look like Boolean.

Addresses http://code.google.com/p/android/issues/detail?id=23465, where
a Float value is potentially 0x0 or Float.MIN_VALUE (0x1), which combines
into a Boolean type, which should be allowed to be promoted to Float.

(cherry picked from commit 2a249c50903d669d2a9296f0fe407b67646626c8)

Change-Id: I1b81fad5e1e166246535bdfa4b7a98db3b2531bf
merge in ics-mr1-release history after reset to ics-mr1
fix dvmDbgOutputAllInterfaces to include only direct super-interfaces

As the javadoc and the spec say dvmDbgOutputAllInterfaces should output only
the directly implemented interfaces. This can be achieved by just iterating
over the `clazz->interfaces`.

Issue: http://code.google.com/p/android/issues/detail?id=21422
Change-Id: I1779e2cc2ada7afaaf4a1e2e5c7861d61d9ea014
Signed-off-by: Johannes Rudolph <johannes.rudolph@gmail.com>
cleanup redundant interfaces from iftable to avoid excessive LinearAlloc use

In deep interface hierarchies super-interfaces are recursively concatenated
to create the iftable. There was no checking for duplicated entries so that the
iftable could get pretty large with just a few layers of interfaces up to the
point where the LinearAlloc was exceeded completely.

This change scans the iftable linearly for existing entries before it adds another
one.

Issue: http://code.google.com/p/android/issues/detail?id=22586
Change-Id: Idb4a13ca7a52f390661629cf2539930242526876
Signed-off-by: Johannes Rudolph <johannes.rudolph@gmail.com>
Updates to the VM tests.

Bug: http://code.google.com/p/android/issues/detail?id=21599
Bug: http://code.google.com/p/android/issues/detail?id=21597
Change-Id: I9c6d67cd18943eb6fa68104f0ec2fbec5ea9e0ec
[PATCH] Basic KSM Support
    Be sure to add '#define MADV_MERGEABLE 12' to   
bionic/libc/include/sys/mman.h so we can have a central place for
this parse the process memory map and inform madvise common
HEAP/Stack regions on fork from zygote
    
These then can be used by the kernel KSM module to re-join (copy on
write) pages between the various dalvik processes.
    
As is on a fully loaded system you can expect ~12MB to be indicated
to be scanned by KSM.. of this 10-15% will be saved; as such a
recommend a very slow scan until as any logic to stop scanning while
sleeping will require another process and remove all memory savings
provided by this logic.
    
To activate on a KSM kernel (2min for full scan of ~16m and 1%CPU):
    
    echo 4000 > /sys/kernel/mm/ksm/sleep_millisecs
    echo 128 > /sys/kernel/mm/ksm/pages_to_scan
    echo 1 > /sys/kernel/mm/ksm/run
    
    Newer kernels only require the last line.
    
In future additional memory regions and kernel logic may improve
this.
AOSP 4.0.4 merges
Additional files missed from AOSP merge