diff options
Diffstat (limited to 'common/almalloc.h')
-rw-r--r-- | common/almalloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/almalloc.h b/common/almalloc.h index a2fdd9d8..0949efdc 100644 --- a/common/almalloc.h +++ b/common/almalloc.h @@ -47,7 +47,10 @@ enum FamCount : size_t { }; #define DEF_FAM_NEWDEL(T, FamMem) \ static constexpr size_t Sizeof(size_t count) noexcept \ - { return decltype(FamMem)::Sizeof(count, offsetof(T, FamMem)); } \ + { \ + return std::max<size_t>(sizeof(T), \ + decltype(FamMem)::Sizeof(count, offsetof(T, FamMem))); \ + } \ \ void *operator new(size_t /*size*/, FamCount count) \ { \ |