diff options
author | Evgeny Eltsin <eaeltsin@google.com> | 2021-02-24 11:58:55 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-02-24 11:58:55 +0000 |
commit | b5e2172df4ce5ae3f5cad9eec4f274009bc364c8 (patch) | |
tree | 0c5699d3dbaa6373c84f5843f3c7fa2fbe7cdff3 | |
parent | 51baeeef88b21ed6bc1d566c8e00dcbb49bbcfc7 (diff) | |
parent | 0827f2f4ea07e19513867c5ff0e69a7e02bc6840 (diff) | |
download | native_bridge_support-b5e2172df4ce5ae3f5cad9eec4f274009bc364c8.tar.gz |
Merge "Init malloc current dispatch table" am: bdbaffae54 am: 0827f2f4ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/libs/native_bridge_support/+/1602094
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I3f0990696b4688b6adb9ade9938803f1a392b374
-rw-r--r-- | libc/malloc_init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/malloc_init.cpp b/libc/malloc_init.cpp index e0fc52e..abe17a4 100644 --- a/libc/malloc_init.cpp +++ b/libc/malloc_init.cpp @@ -79,8 +79,10 @@ static void malloc_init_impl(libc_globals* globals) { native_bridge_aligned_alloc, native_bridge_malloc_info, }; + globals->malloc_dispatch_table = malloc_default_dispatch; - globals->current_dispatch_table = &globals->malloc_dispatch_table; + atomic_store(&globals->default_dispatch_table, &malloc_default_dispatch); + atomic_store(&globals->current_dispatch_table, &malloc_default_dispatch); } // Initializes memory allocation framework. |