mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Clearly separated notion of entries and chunks, averageKeySize()/ValueSize() instead of keySize()/valueSize(), minor fixes and refactorings
This commit is contained in:
@@ -150,7 +150,7 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
|
||||
private long bitsPerSegmentInModIterBitSet() {
|
||||
// min 128 * 8 to prevent false sharing on updating bits from different segments
|
||||
// TODO this doesn't prevent false sharing. There should be GAPS between per-segment bits
|
||||
return Maths.nextPower2(entriesPerSegment, 128L * 8L);
|
||||
return Maths.nextPower2(actualChunksPerSegment, 128L * 8L);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1157,7 +1157,7 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
|
||||
// key is not found
|
||||
if (remote) {
|
||||
long entrySize = entrySize(keySize, 0);
|
||||
long pos = alloc(inBlocks(entrySize));
|
||||
long pos = alloc(inChunks(entrySize));
|
||||
long offset = offsetFromPos(pos);
|
||||
clearMetaData(offset);
|
||||
reuse(entry, offset);
|
||||
|
||||
Reference in New Issue
Block a user