3 ms·
There's no target neutral way in Rust IIRC but there is a standard way among unix-style targets. It's page granularity, and requires superuser privileges thoug
by wyldfire 8y ago
There's no target neutral way in Rust IIRC but there is a standard way among unix-style targets. It's page granularity, and requires superuser privileges though.
See mlock(2) for details [1].
[1] https://man.openbsd.org/mlock.2 https://man.openbsd.org/mlock.2
- the8472 8y agoAt least on linux unprivileged processes can lock a limited amount of memory. > Since Linux 2.6.9, no limits are placed on the amount of memory that a privileged process can lock and the RLIMIT_MEMLOCK soft resource limit instead defines a limit on how much memory an unprivileged process may lock.