@@ -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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__arch64__)
|
||||
#if defined(__aarch64__)
|
||||
# define SNMALLOC_VA_BITS_64
|
||||
#else
|
||||
# define SNMALLOC_VA_BITS_32
|
||||
|
||||
@@ -76,15 +76,15 @@ namespace snmalloc
|
||||
SNMALLOC_ASSERT(
|
||||
is_aligned_block<OS_PAGE_SIZE>(p, size) || (zero_mem == NoZero));
|
||||
|
||||
if constexpr (zero_mem == YesZero)
|
||||
static_cast<OS*>(this)->template zero<true>(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<OS*>(this)->template zero<true>(p, size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user