MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / fallocate

Method fallocate

crates/commitlog/src/segment.rs:245–250  ·  view source on GitHub ↗
(&mut self, size: u64)

Source from the content-addressed store, hash-verified

243
244 #[cfg(all(feature = "fallocate", target_os = "linux"))]
245 fn fallocate(&mut self, size: u64) -> io::Result<()> {
246 use nix::fcntl::{fallocate, FallocateFlags};
247
248 fallocate(self, FallocateFlags::FALLOC_FL_KEEP_SIZE, 0, size as _)?;
249 Ok(())
250 }
251
252 // Fail compilation if `fallocate` is enabled but not supported.
253 #[cfg(all(feature = "fallocate", not(target_os = "linux"), not(any(test, feature = "test"))))]

Callers

nothing calls this directly

Calls 3

fallocateFunction · 0.50
OkFunction · 0.50
get_mutMethod · 0.45

Tested by

no test coverage detected