Simplify VanillaChronicleHash.roundUpMapHeaderSize() because rational behind former complexity (considering buffering in Map header serializer) is 1) gone (because BinaryWire is used instead of built-in serialization 2) was incorrect anyway, because rounding up doesn't prevent problems with buffering

This commit is contained in:
leventov
2016-01-21 15:13:29 +03:00
parent cc36f8f4ff
commit 69337322ee
@@ -398,10 +398,7 @@ public abstract class VanillaChronicleHash<K,
}
private static long roundUpMapHeaderSize(long headerSize) {
long roundUp = (headerSize + 127L) & ~127L;
if (roundUp - headerSize < 64)
roundUp += 128;
return roundUp;
return CACHE_LINES.align(headerSize, BYTES);
}
public final void createMappedStoreAndSegments(BytesStore bytesStore) throws IOException {