Non-replicated Chronicle Map now is not limited with x64 max oversize factor

This commit is contained in:
leventov
2014-12-19 16:09:49 +07:00
parent 2910915dc9
commit 0ff794d6a6
7 changed files with 99 additions and 24 deletions
@@ -21,6 +21,7 @@ package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.serialization.*;
import net.openhft.chronicle.hash.serialization.internal.*;
import net.openhft.chronicle.hash.serialization.internal.ByteBufferMarshaller;
import net.openhft.lang.MemoryUnit;
import net.openhft.lang.io.ByteBufferBytes;
import net.openhft.lang.io.Bytes;
import net.openhft.lang.io.serialization.BytesMarshallable;
@@ -261,10 +262,7 @@ final class SerializationBuilder<E> implements Cloneable, Serializable {
copies, this.metaInterop, interop, sampleObject);
break findSufficientSerializationSize;
} catch (Exception e) {
// assuming nobody need > 512 mb _constant size_ keys/values
if (maxSize > 512 * 1024 * 1024) {
throw e;
}
CopyingMetaBytesInterop.checkMaxSizeStillReasonable(maxSize, e);
maxSize(maxSize * 2);
}
}