mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user