-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
The JACK ring buffer provides this, see https://jackaudio.org/api/ringbuffer_8h.html#aeb059ff23c65389d48ebbe948f05c2b2.
The libc crate seems to be able to do this:
https://docs.rs/libc/0.2.79/libc/fn.mlock.html
https://docs.rs/libc/0.2.79/libc/fn.munlock.html
It should be simple to add this as a method to RingBuffer.
The JACK wrapper also provides it:
https://docs.rs/jack/0.7.0/jack/struct.RingBuffer.html#method.mlock
Windows might need special treatment with https://docs.rs/winapi/0.3.9/winapi/um/memoryapi/fn.VirtualLock.html?
Do we have to expose mlock() as unsafe?
Probably it would be better to simply provide an (unsafe?) method to expose the underlying memory as a pointer?
Be-ing
Metadata
Metadata
Assignees
Labels
No labels