Make android_mallopt weak for native bridge

It is not intercepted by malloc hooks.

Test: bionic-unit-tests --gtest_filter=android_mallopt*
Change-Id: I3fb4101bdcdb62d82a09212fda9eafff7f43c786
This commit is contained in:
Evgeny Eltsin 2019-12-16 16:37:44 +01:00
parent 838ca10715
commit edbc9e2074

View file

@ -465,6 +465,7 @@ extern "C" ssize_t malloc_backtrace(void* pointer, uintptr_t* frames, size_t fra
// =============================================================================
// Platform-internal mallopt variant.
// =============================================================================
__BIONIC_WEAK_FOR_NATIVE_BRIDGE
extern "C" bool android_mallopt(int opcode, void* arg, size_t arg_size) {
if (opcode == M_SET_ZYGOTE_CHILD) {
if (arg != nullptr || arg_size != 0) {