diff --git a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java index 104842592..9d4e11480 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java @@ -20,6 +20,7 @@ import net.openhft.chronicle.algo.bytes.Access; import net.openhft.chronicle.algo.locks.*; import net.openhft.chronicle.bytes.NativeBytesStore; import net.openhft.chronicle.core.Maths; +import net.openhft.chronicle.core.OS; import net.openhft.chronicle.hash.*; import net.openhft.chronicle.hash.impl.util.BuildVersion; import net.openhft.chronicle.hash.serialization.BytesReader; @@ -256,15 +257,14 @@ public abstract class VanillaChronicleHash(); - long tierBulkOffset = roundUpRuntimePageSize(sizeInBytesWithoutTiers()); + long tierBulkOffset = OS.mapAlign(sizeInBytesWithoutTiers()); if (byteStoreSize >= tierBulkOffset + tierBulkSizeInBytes) { assert !createdOrInMemory : "Chronicle Map is allocated in-memory or created " + "persisted without extra tier bulks"; @@ -418,8 +418,7 @@ public abstract class VanillaChronicleHash