Merge branch 'master' into new-license

This commit is contained in:
Dmitry Pisklov
2018-09-14 13:31:40 +01:00
7 changed files with 41 additions and 17 deletions
@@ -749,6 +749,7 @@ public final class ChronicleMapBuilder<K, V> implements
double valueSize = averageValueSize();
size += averageSizeStoringLength(valueBuilder, valueSize);
int alignment = valueAlignment();
size = alignAddr((long) Math.ceil(size), alignment); // so the value starts aligned
int worstAlignment;
if (worstAlignmentComputationRequiresValueSize(alignment)) {
long constantSizeBeforeAlignment = toLong(size);
@@ -924,6 +925,8 @@ public final class ChronicleMapBuilder<K, V> implements
throw new IllegalArgumentException("Alignment should be a power of 2, " + alignment +
" given");
}
if (Jvm.isArm() && alignment < 8)
return this;
this.alignment = alignment;
return this;
}