Add implicit alignment
This commit is contained in:
@@ -61,6 +61,9 @@ public class UploadStream {
|
|||||||
if (size > this.uploadBuffer.size()) {
|
if (size > this.uploadBuffer.size()) {
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
//Force natural size alignment, this should ensure that _all_ allocations are aligned to this size, note, this only effects the allocation block
|
||||||
|
// not how much data is moved or copied
|
||||||
|
size = (size+15)&~15;//Alignment to 16 bytes
|
||||||
|
|
||||||
long addr;
|
long addr;
|
||||||
if (this.caddr == -1 || !this.allocationArena.expand(this.caddr, (int) size)) {
|
if (this.caddr == -1 || !this.allocationArena.expand(this.caddr, (int) size)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user