diff options
author | 2023-04-27 03:45:09 -0700 | |
---|---|---|
committer | 2023-04-27 03:45:09 -0700 | |
commit | 990f53f98619061b170e265d4f3e06146f39135f (patch) | |
tree | 234d7f8edb07c9de0bcde5fe625959b4eecb789f /src/linux_c.zig | |
parent | 93833337999c66c7c6888f85ab12fe9d27136e99 (diff) | |
download | bun-990f53f98619061b170e265d4f3e06146f39135f.tar.gz bun-990f53f98619061b170e265d4f3e06146f39135f.tar.zst bun-990f53f98619061b170e265d4f3e06146f39135f.zip |
Don't preallocate unless its profitable
Diffstat (limited to '')
-rw-r--r-- | src/linux_c.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/linux_c.zig b/src/linux_c.zig index 0b39d1987..dade43a32 100644 --- a/src/linux_c.zig +++ b/src/linux_c.zig @@ -292,6 +292,7 @@ pub const SystemErrno = enum(u8) { }; }; +pub const preallocate_length = 2048 * 1024; pub fn preallocate_file(fd: std.os.fd_t, offset: std.os.off_t, len: std.os.off_t) anyerror!void { // https://gist.github.com/Jarred-Sumner/b37b93399b63cbfd86e908c59a0a37df // ext4 NVME Linux kernel 5.17.0-1016-oem x86_64 |