a403780538ac9d1a260e064df6599663f8cc4166 |
10-Jun-2014 |
Christopher Ferris <cferris@google.com> |
Put all allocation functions into dispatch table. Implement these new functions for all of the debug malloc types. Fix a number of bugs in the debug malloc functions related to overflow conditions. Fix a bug in dlpvalloc due to an overflow condition. Fix various other bugs in the debug malloc functions. Add new tests for malloc functions. Bug: 11225066 Change-Id: Idf50f389603e2157645565bc15cd9365eec2e9dd
alloc.c
|
09f76cdd9bba385b1eab4ffd6abd1aed96dce93d |
06-Sep-2012 |
Ian Rogers <irogers@google.com> |
Fix build warning of initialization but no use. first_run is only used with LOCK_AT_FORK, however, care needs to be taken with the #if to avoid compiler warnings when LOCK_AT_FORK isn't being used. Change-Id: I6bcfac2ab8732c91607f4a1bcd7c0019f29c2eec
alloc.c
|
82978cae4eec238a9d631d2b61b8985daa02516e |
05-Sep-2012 |
Ian Rogers <irogers@google.com> |
Merge "Avoid malloc lock while calling pthread_atfork."
|
63deae5e4f186a453fb6fbab0d8acf314aab4df0 |
05-Sep-2012 |
Elliott Hughes <enh@google.com> |
Add missing MALLOC_FAILURE_ACTION calls to dlmalloc. Without these, sometimes malloc(3) returns NULL without setting errno. Change-Id: I4708c3f675bf2c878ddcaf012fde7848b255826b
alloc.c
|
3e2d2936b0447ed2f0b0aab3625494b2533cd422 |
31-Aug-2012 |
Kirill Artamonov <kartamonov@nvidia.com> |
Avoid malloc lock while calling pthread_atfork. Expecting the memory in a forked child process to be sane wrt threading is a bad idea. An example of a problem is when the parent process has the malloc lock and a child process is forked. The malloc lock in the child will appear locked by a thread that doesn't exist. This change aims to make bionic more compatible with glibc by reseting the malloc lock in the child forked process, as well as holding it during the fork. This is a feature in dlmalloc 2.8.6 called LOCK_AT_FORK. In general this feature isn't necessary as a forked process will then exec. Some bad applications rely on being able to use features like malloc before the exec and having multiple threads running in the parent program. This isn't a problem with glibc and this patch makes it not a problem for bionic. Unfortunately for use in bionic, LOCK_AT_FORK has an issue as internally it uses pthread_atfork that in bionic uses malloc. This leads to the LOCK_AT_FORK initialization deadlocking with pthread_atfork's call to malloc due to the malloc lock. This change moves the pthread_atfork logic in LOCK_AT_FORK to be called without the malloc lock held. Change-Id: Id68175a564a6abb936ee4488b44d9479f7311f69
alloc.c
|
c6d95add30dc24674bdcb39f69812c115e4205fd |
29-Aug-2012 |
Ian Rogers <irogers@google.com> |
Upgrade to dlmalloc 2.8.6. This fixes a bug and enables the use of MORECORE_CONTIGUOUS. Change-Id: Ia7c5d32bdc46e99b3ecb92ee94d1f702c4385d5d
EADME.txt
alloc.c
alloc.h
|
999089181ef60bb67e1a49f2cf6f4ec608a7caf8 |
18-Aug-2012 |
Ian Rogers <irogers@google.com> |
Upgrade to dlmalloc 2.8.5. Move dlmalloc code to upstream-dlmalloc to make pulling upstream changes easier. Declare pvalloc and malloc_usable_size routines present in malloc.h but with missing implementations. Remove other functions from malloc.h that have no implementation nor use in Android. Change-Id: Ia6472ec6cbebc9ad1ef99f4669de9d33fcc2efb4
EADME.txt
alloc.c
alloc.h
|