diff --git a/src/aal/aal.h b/src/aal/aal.h index 4f5355f..1fb58b7 100644 --- a/src/aal/aal.h +++ b/src/aal/aal.h @@ -77,12 +77,15 @@ namespace snmalloc tick.time_since_epoch()) .count()); } + else + { #if __has_builtin(__builtin_readcyclecounter) && \ !defined(SNMALLOC_NO_AAL_BUILTINS) - return __builtin_readcyclecounter(); + return __builtin_readcyclecounter(); #else - return Arch::tick(); + return Arch::tick(); #endif + } } }; diff --git a/src/aal/aal_arm.h b/src/aal/aal_arm.h index 9dc722b..1bdc053 100644 --- a/src/aal/aal_arm.h +++ b/src/aal/aal_arm.h @@ -1,6 +1,6 @@ #pragma once -#if defined(__arch64__) +#if defined(__aarch64__) # define SNMALLOC_VA_BITS_64 #else # define SNMALLOC_VA_BITS_32 diff --git a/src/pal/pal_posix.h b/src/pal/pal_posix.h index 4c3a842..e15a63f 100644 --- a/src/pal/pal_posix.h +++ b/src/pal/pal_posix.h @@ -76,15 +76,15 @@ namespace snmalloc SNMALLOC_ASSERT( is_aligned_block(p, size) || (zero_mem == NoZero)); - if constexpr (zero_mem == YesZero) - static_cast(this)->template zero(p, size); - #ifdef USE_POSIX_COMMIT_CHECKS mprotect(p, size, PROT_READ | PROT_WRITE); #else UNUSED(p); UNUSED(size); #endif + + if constexpr (zero_mem == YesZero) + static_cast(this)->template zero(p, size); } /**