summaryrefslogtreecommitdiffstats
path: root/memfilepersistence
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-10-03 14:16:37 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-10-03 16:52:39 +0000
commitf1eeba4aee1020625205ccf5223128ad8f68265b (patch)
tree02bbe562c1e1c4d4f76e9037a05daf363953f446 /memfilepersistence
parent468fc26fb7f543f4d55e18d381848920047daf75 (diff)
Handle variations to alignment smoother.
Diffstat (limited to 'memfilepersistence')
-rw-r--r--memfilepersistence/src/tests/spi/buffer_test.cpp4
-rw-r--r--memfilepersistence/src/vespa/memfilepersistence/mapper/buffer.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/memfilepersistence/src/tests/spi/buffer_test.cpp b/memfilepersistence/src/tests/spi/buffer_test.cpp
index fdbd7a32f17..0addb1032f5 100644
--- a/memfilepersistence/src/tests/spi/buffer_test.cpp
+++ b/memfilepersistence/src/tests/spi/buffer_test.cpp
@@ -36,8 +36,8 @@ BufferTest::getSizeReturnsInitiallyAllocatedSize()
void
BufferTest::getSizeReturnsUnAlignedSizeForMMappedAllocs()
{
- Buffer buf(vespalib::alloc::MMapAllocator::HUGEPAGE_SIZE + 1);
- CPPUNIT_ASSERT_EQUAL(size_t(vespalib::alloc::MMapAllocator::HUGEPAGE_SIZE + 1), buf.getSize());
+ Buffer buf(vespalib::alloc::MemoryAllocator::HUGEPAGE_SIZE + 1);
+ CPPUNIT_ASSERT_EQUAL(size_t(vespalib::alloc::MemoryAllocator::HUGEPAGE_SIZE + 1), buf.getSize());
}
void
diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/buffer.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/buffer.cpp
index 886c2a35c13..38c2e76929c 100644
--- a/memfilepersistence/src/vespa/memfilepersistence/mapper/buffer.cpp
+++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/buffer.cpp
@@ -16,7 +16,7 @@ namespace memfile {
// It is crucial that any backing buffer type returns an address that is
// 512-byte aligned, or direct IO will scream at us and fail everything.
Buffer::Buffer(size_t size)
- : _buffer(DefaultAlloc::create(size, MMapAllocator::HUGEPAGE_SIZE, 512)),
+ : _buffer(DefaultAlloc::create(size, MemoryAllocator::HUGEPAGE_SIZE, 512)),
_size(size)
{
}