mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
corrected -> return (int) (sizeInBytes / chunkSize) + 1;
This commit is contained in:
@@ -420,8 +420,7 @@ public abstract class VanillaChronicleHash<K,
|
||||
}
|
||||
}
|
||||
|
||||
public final void createInMemoryStoreAndSegments(ChronicleHashResources resources)
|
||||
throws IOException {
|
||||
public final void createInMemoryStoreAndSegments(ChronicleHashResources resources) {
|
||||
this.resources = resources;
|
||||
BytesStore bytesStore = nativeBytesStoreWithFixedCapacity(sizeInBytesWithoutTiers());
|
||||
createStoreAndSegments(bytesStore);
|
||||
@@ -709,8 +708,8 @@ public abstract class VanillaChronicleHash<K,
|
||||
|
||||
// int division is MUCH faster than long on Intel CPUs
|
||||
if (sizeInBytes <= Integer.MAX_VALUE)
|
||||
return (((int) sizeInBytes) / (int) chunkSize) + 2;
|
||||
return (int) (sizeInBytes / chunkSize) + 2;
|
||||
return (((int) sizeInBytes) / (int) chunkSize) + 1;
|
||||
return (int) (sizeInBytes / chunkSize) + 1;
|
||||
}
|
||||
|
||||
public final int size() {
|
||||
|
||||
Reference in New Issue
Block a user