pub struct DiskStorage { /* private fields */ }Expand description
Disk-backed storage using memory-mapped files with O_DIRECT support.
Implementations§
Source§impl DiskStorage
impl DiskStorage
Sourcepub fn new(size: usize) -> Result<Self>
pub fn new(size: usize) -> Result<Self>
Creates a new disk storage of the given size in the default cache directory.
Sourcepub fn new_at(path: impl AsRef<Path>, len: usize) -> Result<Self>
pub fn new_at(path: impl AsRef<Path>, len: usize) -> Result<Self>
Creates a new disk storage at the specified path with the given size.
Sourcepub fn unlink(&mut self) -> Result<()>
pub fn unlink(&mut self) -> Result<()>
Unlinks the backing file from the filesystem. This means that when this process terminates, the file will be automatically deleted by the OS. Unfortunately, GDS requires that files we try to register must be linked. To get around this, we unlink the file only after we’ve registered it with NIXL.
Trait Implementations§
Source§impl Debug for DiskStorage
impl Debug for DiskStorage
Source§impl Drop for DiskStorage
impl Drop for DiskStorage
Source§impl MemoryDescriptor for DiskStorage
impl MemoryDescriptor for DiskStorage
Source§fn storage_kind(&self) -> StorageKind
fn storage_kind(&self) -> StorageKind
Type of storage backing this region.
Source§fn nixl_descriptor(&self) -> Option<NixlDescriptor>
fn nixl_descriptor(&self) -> Option<NixlDescriptor>
Get the NIXL descriptor for this memory region.
Source§impl NixlCompatible for DiskStorage
impl NixlCompatible for DiskStorage
Auto Trait Implementations§
impl Freeze for DiskStorage
impl RefUnwindSafe for DiskStorage
impl Send for DiskStorage
impl Sync for DiskStorage
impl Unpin for DiskStorage
impl UnsafeUnpin for DiskStorage
impl UnwindSafe for DiskStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more