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.cpp b/libc/bionic/malloc_common.cpp
index a0da3db..30c9cc7 100644
--- a/libc/bionic/malloc_common.cpp
+++ b/libc/bionic/malloc_common.cpp
@@ -41,6 +41,7 @@
#include <private/bionic_config.h>
#include <platform/bionic/malloc.h>
+#include "heap_tagging.h"
#include "malloc_common.h"
#include "malloc_limit.h"
@@ -275,6 +276,9 @@
if (opcode == M_SET_ALLOCATION_LIMIT_BYTES) {
return LimitEnable(arg, arg_size);
}
+ if (opcode == M_SET_HEAP_TAGGING_LEVEL) {
+ return SetHeapTaggingLevel(arg, arg_size);
+ }
errno = ENOTSUP;
return false;
}