Add macro for ASSUME and FAST_PATH/SLOW_PATH

Fixes GCC warning that was incorrect using an ASSUME.

Made fast path and slow path Macros so we can add additional attributes.
This commit is contained in:
Matthew Parkinson
2019-07-01 11:49:35 +01:00
parent c2780f99ed
commit 3c7d122dea
6 changed files with 41 additions and 26 deletions

View File

@@ -189,7 +189,7 @@ namespace snmalloc
* (over the lifetime of this process). If the underlying system does not
* support low memory notifications, this will return 0.
*/
ALWAYSINLINE
FAST_PATH
uint64_t low_memory_epoch()
{
if constexpr (pal_supports<LowMemoryNotification>())
@@ -235,7 +235,7 @@ namespace snmalloc
}
}
ALWAYSINLINE void lazy_decommit_if_needed()
FAST_PATH void lazy_decommit_if_needed()
{
#ifdef TEST_LAZY_DECOMMIT
static_assert(