On Alpine 3.19+ running on aarch64 AWS EC2 Graviton instances, the C lib api, fallocate64, is no longer available. The Posix layer should invoke fallocate in this case.
Proposed fix in the JNRPosixAPI class would be to introduce a system property that allows fallocate to always be invoked:
@Override
public int fallocate(int fd, int mode, long offset, long length) {
if (Boolean.parseBoolean(System.getProperty("net.openhft.posix.internal.jnr.JNRPosixAPI.fallocate_no_shim"))) {
return jnr.fallocate(fd, mode, offset, length);
}
return UnsafeMemory.IS32BIT ? jnr.fallocate(fd, mode, offset, length) : jnr.fallocate64(fd, mode, offset, length);
}