This commit is contained in:
peter lawrey
2018-09-14 11:26:13 +00:00
parent 337698b408
commit b413c026ee
7 changed files with 22 additions and 6 deletions
@@ -750,6 +750,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);
@@ -925,6 +926,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;
}
@@ -144,7 +144,6 @@ public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
throw new UnsupportedOperationException();
}
@Override
public boolean compareAndSwapLong(long offset, long expected, long value) {
if (expected != 0 || value != 0)
@@ -152,6 +151,7 @@ public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
return true;
}
@Override
public void reserve() throws IllegalStateException {
}