diff --git a/src/pal/pal_apple.h b/src/pal/pal_apple.h index b82b6d4..a0b2bb8 100644 --- a/src/pal/pal_apple.h +++ b/src/pal/pal_apple.h @@ -25,7 +25,12 @@ namespace snmalloc */ static constexpr uint64_t pal_features = PALBSD::pal_features; - // OS specific function for zeroing memory with ID 241. + /** + * OS specific function for zeroing memory with the Apple application + * tag id. + * + * See comment below. + */ template void zero(void* p, size_t size) { @@ -47,7 +52,11 @@ namespace snmalloc bzero(p, size); } - // Reserve memory with ID 241. + /** + * Reserve memory with the Apple application tag id. + * + * See comment below. + */ template void* reserve(const size_t* size) { @@ -75,7 +84,7 @@ namespace snmalloc * (e.g. LLVM sanitizers has 99) so we can monitor their states * via vmmap for instance. */ - int pal_anon_id = VM_MAKE_TAG(241); + static constexpr int pal_anon_id = VM_MAKE_TAG(241); }; } // namespace snmalloc #endif