bionic: Detect userspace memory leak

When process is consuming memory beyond the limit specified by
property, it will print all the allocations of the same process.
To enable this feature, do following steps:
1. libc.debug.malloc 40
2. libc.debug.malloc.program <PROCESS_NAME>
3. libc.debug.malloc.maxprocsize <VALUE_IN_BYTES>
4. libc.malloc.minalloclim <VALUE_IN_BYTES>

Change-Id: I03a4de9643ec954802b26443ce5685975ea30f89
Merge "bionic: Detect userspace memory leak"
Merge commit 'android-4.4.1_r1' into merge_branch

* commit 'android-4.4.1_r1':
  Upgrade to tzdata2013h.
Merge "Merge commit 'android-4.4.1_r1' into merge_branch"
libc: arm: Allow optional optimization of memmove and bcopy

The libc functions memmove and bcopy are not configurable target-by-
target.  This change allows per-target optimization for best perfor-
mance.

Change-Id: Id684672fbf0bcffbe68c36a28b64186a6c2554f3
libc: krait: Implement optimized versions of memmove and bcopy

Restore a jellybean optimization for memmove and bcopy on krait.
Code has been refactored to thumb2 for consistency with the rest of
bionic libc, as well as performance and correctness.

Change-Id: I8f2f77dce4534fbce1bdf0188ab353bf34ab8637
bionic: Fix aliasing violations

This makes bionic compile with compilers enforcing
strict adherence to aliasing rules (e.g. gcc 4.6+
with -Wstrict-aliasing=2 -Werror=strict-aliasing).

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
bionic:Add new header files for graphics

The header files "hwmem.h" and "b2r2_blt.h" are needed
by the ST-Ericsson graphics implementation.

Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
bionic: Add ARMv7 optimized string handling routines

Add ARMv7 - and especially Cortex-A9 - optimized string handling
routines based on the versions found in the cortex-strings library.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Add workarounds for current compilers

With current compilers, we're getting "this function cannot be inlined"
errors on vsnprintf and strlcpy because the always_inline attribute is
set.

Before marking this a "fix" instead of a "workaround", we should figure
out why the functions can't be inlined.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Make use of new memcpy, tweak settings

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The new memcpy() is slightly faster than the cortex-strings version,
and fixes the Galaxy Nexus camera issue.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
bionic: Add Cortex-A15 optimized version of memcpy

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add the memcpy implementation from cortex-strings -- faster than
the current implementation on both A9 and A15.

To be investigated: Breaks saving pictures from the camera in
Galaxy Nexus builds

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
remove typos and multiple declarations

Change-Id: Iff32874c2f801519b57f19a3cc1c2c76b7c7f6fa
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
revert cortex string optimization routines for now

Change-Id: I410bdef93efd51277b494bde0300a01c49e926f7
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Add optimized sincos() function (ported from linaro_android_4.2.2)

Change-Id: I77f84d7ebc2dd7d5aa352b108b05e2651b5605c1
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Declare __page_shift and __page_size with C linkage

__page_shift and __page_size are defined in asm/page.h with
C linkage - their implementation needs to use the same linkage.

The different linkage types cause a compiler error with clang.
Fixing them seems to be a good idea regardless of the compiler.

Change-Id: I35ed66a08989ced1db422eb03e4d154a5d6b5bda
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Fix mismatch between declaration and forward declaration

KernelArgumentBlock is defined as a class in KernelArgumentBlock.h, but
forward declarations refer to it as a struct.

While this is essentially the same, the mismatch causes a compiler
warning in clang (and may cause warnings in future versions of gcc) in
code that is supposed to be compiled with -Werror.

Change-Id: I4ba49d364c44d0a42c276aff3a8098300dbdcdf0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Fix build after 4.4 merge

Change-Id: I9b5eb314746ebadfced2f4a055a8e1306ca9e4ec
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Don't include memchr.c twice

Change-Id: I663a934dd4c8e7e87e8d018c878b3c4d04b0b914
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Merge "libc: arm: Allow optional optimization of memmove and bcopy"