Rename iterate to malloc_iterate internally.
I have no idea why I used the iterate name internally which is
completely unlike every other function name. Change this to match
everyone else so that it's now malloc_iterate everywhere.
This is probably the last chance to change this before mainline
modules begin, so make everything consistent.
Test: Compiles, unit tests passes.
Change-Id: I56d293377fa0fe1a3dc3dd85d6432f877cc2003c
diff --git a/libc/bionic/malloc_common.cpp b/libc/bionic/malloc_common.cpp
index 96e6140..a0da3db 100644
--- a/libc/bionic/malloc_common.cpp
+++ b/libc/bionic/malloc_common.cpp
@@ -215,9 +215,9 @@
void (*callback)(uintptr_t base, size_t size, void* arg), void* arg) {
auto dispatch_table = GetDispatchTable();
if (__predict_false(dispatch_table != nullptr)) {
- return dispatch_table->iterate(base, size, callback, arg);
+ return dispatch_table->malloc_iterate(base, size, callback, arg);
}
- return Malloc(iterate)(base, size, callback, arg);
+ return Malloc(malloc_iterate)(base, size, callback, arg);
}
// Disable calls to malloc so malloc_iterate gets a consistent view of
@@ -247,9 +247,10 @@
#if __has_feature(hwaddress_sanitizer)
// FIXME: implement these in HWASan allocator.
-extern "C" int __sanitizer_iterate(uintptr_t base __unused, size_t size __unused,
- void (*callback)(uintptr_t base, size_t size, void* arg) __unused,
- void* arg __unused) {
+extern "C" int __sanitizer_malloc_iterate(uintptr_t base __unused, size_t size __unused,
+ void (*callback)(uintptr_t base, size_t size, void* arg)
+ __unused,
+ void* arg __unused) {
return 0;
}