summaryrefslogtreecommitdiff
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2020-11-02 13:35:28 -0800
committerPeter Collingbourne <pcc@google.com>2020-11-18 10:24:29 -0800
commit9eb85bf70ccad3b80a7e9fb25ff1be017e71205d (patch)
tree21ca8edc983eb615924abbc7e5f75fd35dc7a91e /tests/stdio_test.cpp
parent7433096f06a22522c1723b6fef71fdea0f5eba96 (diff)
Change the android_mallopt(M_SET_HEAP_TAGGING_LEVEL) API.
- Make it apply to every thread, and thus remove the restriction that it must be called while the program is single threaded. - Make it change TCF0 itself (on all threads), instead of requiring callers to do it themselves, which can be error prone. And update all of the call sites. Change the implementation of android_mallopt(M_DISABLE_MEMORY_MITIGATIONS) to call android_mallopt(M_SET_HEAP_TAGGING_LEVEL) internally. This avoids crashes during startup that were observed when the two mallopts updated TCF0 unaware of each other. I wouldn't expect there to be any out-of-tree callers at this point, but it's worth noting that the new interface is backwards compatible with the old one because it strictly expands the set of situations in which the API can be used (i.e. situations where there are multiple threads running or where TCF0 hadn't been updated beforehand). Bug: 135772972 Change-Id: I7746707898ff31ef2e0af01c4f55ba90b72bef51
Diffstat (limited to 'tests/stdio_test.cpp')
0 files changed, 0 insertions, 0 deletions