Crates.io | lockedbox |
lib.rs | lockedbox |
version | 0.1.2 |
source | src |
created_at | 2023-09-12 17:59:44.28596 |
updated_at | 2024-07-14 16:41:33.243571 |
description | A Box-like type that prevents paging its contents to disk. |
homepage | |
repository | https://github.com/khonsulabs/lockedbox |
max_upload_size | |
id | 970856 |
size | 29,117 |
A crate providing an mlock
-locked Box<T>
, preventing the contents of its
memory from being paged to disk.
This crate prevents potential accidental unlocking of memory by ensuring the
memory allocated by LockedBox<T>
is always a multiple of the operating
system's page size. Because mlock
/munlock
operate on pages of memory, this
guarantees that each LockedBox<T>
is guaranteed to have its own lock status.
LockedBox<T>
is a thin, safe abstraction built atop
memsec
.
This project, like all projects from Khonsu Labs, is open-source. This repository is available under the MIT License or the Apache License 2.0.
To learn more about contributing, please see CONTRIBUTING.md.