diff options
author | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 13:54:24 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 14:16:17 +0000 |
commit | c0b8734987176a93588909739af143c6b0a1a6ff (patch) | |
tree | 33340f0cfc5e9e4b8691abdaa378712f3bf8ded5 /vespalib/src/tests/datastore/array_store | |
parent | e385cf1498861b27da4312828613bdabab9b2161 (diff) |
use size literals in vespalib
Diffstat (limited to 'vespalib/src/tests/datastore/array_store')
-rw-r--r-- | vespalib/src/tests/datastore/array_store/array_store_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vespalib/src/tests/datastore/array_store/array_store_test.cpp b/vespalib/src/tests/datastore/array_store/array_store_test.cpp index 72f803b441b..bf2ca9629c2 100644 --- a/vespalib/src/tests/datastore/array_store/array_store_test.cpp +++ b/vespalib/src/tests/datastore/array_store/array_store_test.cpp @@ -7,6 +7,7 @@ #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/test/insertion_operators.h> #include <vespa/vespalib/util/memory_allocator.h> +#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/traits.h> #include <vector> @@ -35,7 +36,7 @@ struct Fixture generation_t generation; Fixture(uint32_t maxSmallArraySize, bool enable_free_lists = true) : store(ArrayStoreConfig(maxSmallArraySize, - ArrayStoreConfig::AllocSpec(16, RefT::offsetSize(), 8 * 1024, + ArrayStoreConfig::AllocSpec(16, RefT::offsetSize(), 8_Ki, ALLOC_GROW_FACTOR)).enable_free_lists(enable_free_lists)), refStore(), generation(1) @@ -403,7 +404,7 @@ TEST_F("require that address space usage is ratio between used arrays and number TEST_F("require that offset in EntryRefT is within bounds when allocating memory buffers where wanted number of bytes is not a power of 2 and less than huge page size", ByteFixture(ByteFixture::ArrayStoreType::optimizedConfigForHugePage(1023, vespalib::alloc::MemoryAllocator::HUGEPAGE_SIZE, - 4 * 1024, 8 * 1024, ALLOC_GROW_FACTOR))) + 4_Ki, 8_Ki, ALLOC_GROW_FACTOR))) { // The array store config used in this test is equivalent to the one multi-value attribute uses when initializing multi-value mapping. // See similar test in datastore_test.cpp for more details on what happens during memory allocation. |