Decrease maximum size of wait-free hash tables.

This commit is contained in:
levlam 2022-11-21 18:12:26 +03:00
parent 2207d668e0
commit 44df11cfcf
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ template <class KeyT, class ValueT, class HashT = std::hash<KeyT>, class EqT = s
class WaitFreeHashMap {
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 14;
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 12;
FlatHashMap<KeyT, ValueT, HashT, EqT> default_map_;
struct WaitFreeStorage {

View File

@ -18,7 +18,7 @@ template <class KeyT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<K
class WaitFreeHashSet {
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 14;
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 12;
FlatHashSet<KeyT, HashT, EqT> default_set_;
struct WaitFreeStorage {