fix style violations

This commit is contained in:
lax1dude 2024-11-02 21:05:25 -07:00
parent a5836dff25
commit fec6caa10f

View File

@ -285,7 +285,8 @@ public final class LaxMalloc {
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
@ -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)
*/
private static int getListBucket(int allocSize) {
if (allocSize < 128)
if (allocSize < 128) {
return (allocSize >> 3) - 1;
}
int clz = Integer.numberOfLeadingZeros(allocSize);
int bucketIndex = (clz > 19) ? 110 - (clz << 2) + ((allocSize >> (29 - clz)) ^ 4)