mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Align persisted Chronicle Map creation with Size Prefixed Blob and Self-Bootstrapping Header specifications
This commit is contained in:
@@ -378,9 +378,9 @@ public abstract class VanillaChronicleHash<K,
|
||||
}
|
||||
}
|
||||
|
||||
public final void initBeforeMapping(File file, FileChannel ch, long headerSize)
|
||||
public final void initBeforeMapping(File file, FileChannel ch, long headerEnd)
|
||||
throws IOException {
|
||||
this.headerSize = roundUpMapHeaderSize(headerSize);
|
||||
this.headerSize = roundUpMapHeaderSize(headerEnd);
|
||||
if (!createdOrInMemory) {
|
||||
// This block is for reading segmentHeadersOffset before main mapping
|
||||
// After the mapping globalMutableState value's bytes are reassigned
|
||||
@@ -774,6 +774,10 @@ public abstract class VanillaChronicleHash<K,
|
||||
globalMutableState.setFirstFreeTierIndex(firstTierIndex);
|
||||
}
|
||||
|
||||
public void msync(RandomAccessFile raf) throws IOException {
|
||||
msync(raf, bsAddress(), bs.capacity());
|
||||
}
|
||||
|
||||
private static void msync(RandomAccessFile raf, long address, long length) throws IOException {
|
||||
// address should be a multiple of page size
|
||||
if (OS.pageAlign(address) != address) {
|
||||
|
||||
Reference in New Issue
Block a user