Merge remote-tracking branch 'origin/master' into snmalloc2
This commit is contained in:
@@ -48,6 +48,7 @@ namespace snmalloc
|
||||
constexpr T one_at_bit(S shift)
|
||||
{
|
||||
static_assert(std::is_integral_v<T>, "Type must be integral");
|
||||
SNMALLOC_ASSERT(sizeof(T) * 8 > static_cast<size_t>(shift));
|
||||
return (static_cast<T>(1)) << shift;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# define SNMALLOC_FORCE_BSS __attribute__((section("__DATA,__bss")))
|
||||
#elif defined(__ELF__)
|
||||
# define SNMALLOC_FORCE_BSS __attribute__((section(".bss")))
|
||||
#else
|
||||
# define SNMALLOC_FORCE_BSS
|
||||
#endif
|
||||
|
||||
#ifndef __has_builtin
|
||||
# define __has_builtin(x) 0
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user