Skip to content

Commit b449162

Browse files
committed
1 parent c1d2b8e commit b449162

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
@@ -1326,6 +1326,22 @@ MS_STRICTATIME
13261326
MS_SYNC
13271327
MS_SYNCHRONOUS
13281328
MS_UNBINDABLE
1329+
M_BIONIC_SET_HEAP_TAGGING_LEVEL
1330+
M_BIONIC_ZERO_INIT
1331+
M_CACHE_COUNT_MAX
1332+
M_CACHE_SIZE_MAX
1333+
M_DECAY_TIME
1334+
M_HEAP_TAGGING_LEVEL_ASYNC
1335+
M_HEAP_TAGGING_LEVEL_NONE
1336+
M_HEAP_TAGGING_LEVEL_SYNC
1337+
M_HEAP_TAGGING_LEVEL_TBI
1338+
M_MEMTAG_TUNING
1339+
M_MEMTAG_TUNING_BUFFER_OVERFLOW
1340+
M_MEMTAG_TUNING_UAF
1341+
M_PURGE
1342+
M_PURGE_ALL
1343+
M_THREAD_DISABLE_MEM_INIT
1344+
M_TSDS_COUNT_MAX
13291345
NCCS
13301346
NCP_SUPER_MAGIC
13311347
NDA_CACHEINFO

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)