summaryrefslogtreecommitdiff
path: root/libc/platform/bionic/malloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/platform/bionic/malloc.h')
-rw-r--r--libc/platform/bionic/malloc.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/libc/platform/bionic/malloc.h b/libc/platform/bionic/malloc.h
index 56badf0fd..b56ca746a 100644
--- a/libc/platform/bionic/malloc.h
+++ b/libc/platform/bionic/malloc.h
@@ -28,6 +28,7 @@
#pragma once
+#include <malloc.h>
#include <stdbool.h>
#include <stdint.h>
@@ -85,12 +86,6 @@ enum {
// arg_size = sizeof(android_mallopt_leak_info_t)
M_FREE_MALLOC_LEAK_INFO = 7,
#define M_FREE_MALLOC_LEAK_INFO M_FREE_MALLOC_LEAK_INFO
- // Change the heap tagging state. May be called at any time including when
- // multiple threads are running.
- // arg = HeapTaggingLevel*
- // arg_size = sizeof(HeapTaggingLevel)
- M_SET_HEAP_TAGGING_LEVEL = 8,
-#define M_SET_HEAP_TAGGING_LEVEL M_SET_HEAP_TAGGING_LEVEL
// Query whether the current process is considered to be profileable by the
// Android platform. Result is assigned to the arg pointer's destination.
// arg = bool*
@@ -105,28 +100,6 @@ enum {
// arg_size = sizeof(bool)
M_INITIALIZE_GWP_ASAN = 10,
#define M_INITIALIZE_GWP_ASAN M_INITIALIZE_GWP_ASAN
- // Disable heap initialization across the whole process. If the hardware supports memory
- // tagging, it also disables memory tagging. May be called at any time including
- // when multiple threads are running. arg and arg_size are unused and must be set to 0.
- // Note that the memory mitigations are only implemented in scudo and therefore this API call will
- // have no effect when using another allocator.
- M_DISABLE_MEMORY_MITIGATIONS = 11,
-#define M_DISABLE_MEMORY_MITIGATIONS M_DISABLE_MEMORY_MITIGATIONS
-};
-
-enum HeapTaggingLevel {
- // Disable heap tagging and memory tag checks if supported. Heap tagging may not be re-enabled
- // after being disabled.
- M_HEAP_TAGGING_LEVEL_NONE = 0,
- // Address-only tagging. Heap pointers have a non-zero tag in the most significant byte which is
- // checked in free(). Memory accesses ignore the tag.
- M_HEAP_TAGGING_LEVEL_TBI = 1,
- // Enable heap tagging and asynchronous memory tag checks if supported. Disable stack trace
- // collection.
- M_HEAP_TAGGING_LEVEL_ASYNC = 2,
- // Enable heap tagging and synchronous memory tag checks if supported. Enable stack trace
- // collection.
- M_HEAP_TAGGING_LEVEL_SYNC = 3,
};
// Manipulates bionic-specific handling of memory allocation APIs such as