compiling on linux - bunch of fixes #2
@@ -1105,12 +1105,12 @@ pub const FileWriter = struct {
|
||||
// FALLOC_FL_KEEP_SIZE = 0x01 - allocate without changing file size
|
||||
const FALLOC_FL_KEEP_SIZE = 0x01;
|
||||
const fd = file.handle;
|
||||
const result = std.os.linux.syscall(.fallocate, .{
|
||||
const result = std.os.linux.syscall4(.fallocate,
|
||||
@as(usize, @intCast(fd)),
|
||||
@as(usize, FALLOC_FL_KEEP_SIZE),
|
||||
@as(usize, 0), // offset
|
||||
@as(usize, @intCast(size)),
|
||||
});
|
||||
);
|
||||
if (result == 0) {
|
||||
std.log.debug("PERF: Pre-allocated {} MB with fallocate", .{size / (1024 * 1024)});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user