mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
fix style violations
This commit is contained in:
parent
a5836dff25
commit
fec6caa10f
|
@ -285,7 +285,8 @@ public final class LaxMalloc {
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}while((addrIterator = readChunkNextFreeAddr(addrIterator)).getInt() != chunkPtr.getInt());
|
addrIterator = readChunkNextFreeAddr(addrIterator);
|
||||||
|
} while (addrIterator.getInt() != chunkPtr.getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
// no free huge chunks found, time to sbrk
|
// no free huge chunks found, time to sbrk
|
||||||
|
@ -487,12 +488,14 @@ public final class LaxMalloc {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://github.com/emscripten-core/emscripten/blob/16a0bf174cb85f88b6d9dcc8ee7fbca59390185b/system/lib/emmalloc.c#L241
|
* https://github.com/emscripten-core/emscripten/blob/16a0bf174cb85f88b6d9dcc8ee7fbca59390185b/system/
|
||||||
|
* lib/emmalloc.c#L241
|
||||||
* (MIT License)
|
* (MIT License)
|
||||||
*/
|
*/
|
||||||
private static int getListBucket(int allocSize) {
|
private static int getListBucket(int allocSize) {
|
||||||
if (allocSize < 128)
|
if (allocSize < 128) {
|
||||||
return (allocSize >> 3) - 1;
|
return (allocSize >> 3) - 1;
|
||||||
|
}
|
||||||
|
|
||||||
int clz = Integer.numberOfLeadingZeros(allocSize);
|
int clz = Integer.numberOfLeadingZeros(allocSize);
|
||||||
int bucketIndex = (clz > 19) ? 110 - (clz << 2) + ((allocSize >> (29 - clz)) ^ 4)
|
int bucketIndex = (clz > 19) ? 110 - (clz << 2) + ((allocSize >> (29 - clz)) ^ 4)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user