mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-244 fixed a bug in VanillaChornicleMap
This commit is contained in:
@@ -80,8 +80,8 @@ enum MultiMapFactory {
|
||||
throw new IllegalArgumentException("Capacity " + capacity + " not supported");
|
||||
}
|
||||
|
||||
public static long sizeOfBitSetInBytes(long minCapacity) {
|
||||
return BYTES.convert(LONGS.align(multiMapCapacity(minCapacity), BITS), BITS);
|
||||
public static long sizeOfBitSetInBytes(long actualChunksPerSegment) {
|
||||
return LONGS.align(BYTES.alignAndConvert(actualChunksPerSegment, BITS), BYTES);
|
||||
}
|
||||
|
||||
public static ATSDirectBitSet newPositions(long capacity) {
|
||||
|
||||
@@ -1448,7 +1448,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
|
||||
* multiMapsPerSegment();
|
||||
final NativeBytes bsBytes = new NativeBytes(ms.objectSerializer(),
|
||||
start,
|
||||
start + LONGS.align(BYTES.alignAndConvert(actualChunksPerSegment, BITS), BYTES),
|
||||
start + MultiMapFactory.sizeOfBitSetInBytes(actualChunksPerSegment),
|
||||
null);
|
||||
freeList = new SingleThreadedDirectBitSet(bsBytes);
|
||||
start += numberOfBitSets() * sizeOfSegmentFreeListBitSets();
|
||||
|
||||
Reference in New Issue
Block a user