Skip to content

Commit 0851796

Browse files
committed
1 parent c1d2b8e commit 0851796

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

libc-test/semver/android.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,22 @@ LOG_USER
11901190
LOG_UUCP
11911191
LOG_WARNING
11921192
L_tmpnam
1193+
M_BIONIC_SET_HEAP_TAGGING_LEVEL
1194+
M_BIONIC_ZERO_INIT
1195+
M_CACHE_COUNT_MAX
1196+
M_CACHE_SIZE_MAX
1197+
M_DECAY_TIME
1198+
M_HEAP_TAGGING_LEVEL_ASYNC
1199+
M_HEAP_TAGGING_LEVEL_NONE
1200+
M_HEAP_TAGGING_LEVEL_SYNC
1201+
M_HEAP_TAGGING_LEVEL_TBI
1202+
M_MEMTAG_TUNING
1203+
M_MEMTAG_TUNING_BUFFER_OVERFLOW
1204+
M_MEMTAG_TUNING_UAF
1205+
M_PURGE
1206+
M_PURGE_ALL
1207+
M_THREAD_DISABLE_MEM_INIT
1208+
M_TSDS_COUNT_MAX
11931209
MADV_DODUMP
11941210
MADV_DOFORK
11951211
MADV_DONTDUMP

src/unix/linux_like/android/mod.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ pub type __s16 = c_short;
4444
pub type __u32 = c_uint;
4545
pub type __s32 = c_int;
4646

47+
// malloc.h
48+
type HeapTaggingLevel = u32;
49+
4750
// linux/elf.h
4851

4952
pub type Elf32_Addr = u32;
@@ -3153,6 +3156,26 @@ pub const IFLA_INFO_XSTATS: c_ushort = 3;
31533156
pub const IFLA_INFO_SLAVE_KIND: c_ushort = 4;
31543157
pub const IFLA_INFO_SLAVE_DATA: c_ushort = 5;
31553158

3159+
// malloc.h
3160+
pub const M_DECAY_TIME: c_int = -100;
3161+
pub const M_PURGE: c_int = -101;
3162+
pub const M_MEMTAG_TUNING: c_int = -102;
3163+
pub const M_THREAD_DISABLE_MEM_INIT: c_int = -103;
3164+
pub const M_PURGE_ALL: c_int = -104;
3165+
pub const M_CACHE_COUNT_MAX: c_int = -200;
3166+
pub const M_CACHE_SIZE_MAX: c_int = -201;
3167+
pub const M_TSDS_COUNT_MAX: c_int = -202;
3168+
pub const M_BIONIC_ZERO_INIT: c_int = -203;
3169+
pub const M_BIONIC_SET_HEAP_TAGGING_LEVEL: c_int = -204;
3170+
3171+
pub const M_MEMTAG_TUNING_BUFFER_OVERFLOW: c_int = 0;
3172+
pub const M_MEMTAG_TUNING_UAF: c_int = 1;
3173+
3174+
pub const M_HEAP_TAGGING_LEVEL_NONE: HeapTaggingLevel = 0;
3175+
pub const M_HEAP_TAGGING_LEVEL_TBI: HeapTaggingLevel = 1;
3176+
pub const M_HEAP_TAGGING_LEVEL_ASYNC: HeapTaggingLevel = 2;
3177+
pub const M_HEAP_TAGGING_LEVEL_SYNC: HeapTaggingLevel = 3;
3178+
31563179
// linux/rtnetlink.h
31573180
pub const TCA_UNSPEC: c_ushort = 0;
31583181
pub const TCA_KIND: c_ushort = 1;

0 commit comments

Comments
 (0)