mte: move is_memtag_enabled to read-only allocator data

This commit is contained in:
Dmitry Muhomor 2023-10-28 22:55:34 +03:00 committed by Daniel Micay
parent 576328b1b4
commit 01a199e19e
2 changed files with 23 additions and 17 deletions

View file

@ -10,18 +10,6 @@
#define TAG_WIDTH 4
#endif
#ifdef MEMTAG
extern bool __is_memtag_enabled;
#endif
static inline bool is_memtag_enabled(void) {
#ifdef MEMTAG
return __is_memtag_enabled;
#else
return false;
#endif
}
static inline void *untag_pointer(void *ptr) {
#ifdef HAS_ARM_MTE
const uintptr_t mask = UINTPTR_MAX >> 8;