Add dlmalloc_usable_size for 32 bit arches.
Bug: 17337831 Change-Id: I50c50559a5dfa083c85f064042bc0726718c988b
This commit is contained in:
parent
1e010d6039
commit
1c365cb494
libc/bionic
@ -34,6 +34,13 @@
|
|||||||
|
|
||||||
#define malloc_getpagesize getpagesize()
|
#define malloc_getpagesize getpagesize()
|
||||||
|
|
||||||
|
/* dlmalloc_usable_size was exposed in the NDK, so change the name
|
||||||
|
* of the function on 32 bit architectures.
|
||||||
|
*/
|
||||||
|
#if !defined(__LP64__)
|
||||||
|
#define dlmalloc_usable_size dlmalloc_usable_size_real
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Export two symbols used by the VM. */
|
/* Export two symbols used by the VM. */
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int dlmalloc_trim(size_t) __LIBC_ABI_PUBLIC__;
|
int dlmalloc_trim(size_t) __LIBC_ABI_PUBLIC__;
|
||||||
|
@ -308,4 +308,11 @@ extern "C" void arc4random_stir(void) {
|
|||||||
// The current implementation stirs itself as needed.
|
// The current implementation stirs itself as needed.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Old versions of the NDK did not export malloc_usable_size, but did
|
||||||
|
// export dlmalloc_usable_size. We are moving away from dlmalloc in L
|
||||||
|
// so make this call malloc_usable_size.
|
||||||
|
extern "C" size_t dlmalloc_usable_size(void* ptr) {
|
||||||
|
return malloc_usable_size(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user