ruby rub <lists / ruby-forum.com> wrote:
> Also is it possible to set the buffer to not be swapped out?

Kernel memory is unswappable (at least on Linux).  You can probably hook
up mlockall() pretty easily via DL/FFI/Fiddle/C extension.

Using the finer-grained mlock() probably requires a C extension (and
mlock() probably won't work with Rubinius, only MRI).