Add an android_mallopt for controlling the heap tagging level.
This doesn't add any functionality for now, but there are
a couple of changes in flight that will want to add enumerators
to the mallopt, so let's give them a place to add them.
Bug: 135772972
Bug: 135754954
Change-Id: I6e810020f66070e844500c6fa99b703963365659
diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp
index eec49a4..8068f4e 100644
--- a/libc/bionic/malloc_common_dynamic.cpp
+++ b/libc/bionic/malloc_common_dynamic.cpp
@@ -64,6 +64,7 @@
#include <sys/system_properties.h>
+#include "heap_tagging.h"
#include "malloc_common.h"
#include "malloc_common_dynamic.h"
#include "malloc_heapprofd.h"
@@ -499,6 +500,9 @@
}
return FreeMallocLeakInfo(reinterpret_cast<android_mallopt_leak_info_t*>(arg));
}
+ if (opcode == M_SET_HEAP_TAGGING_LEVEL) {
+ return SetHeapTaggingLevel(arg, arg_size);
+ }
return HeapprofdMallopt(opcode, arg, arg_size);
}
// =============================================================================