From: Aaron Patterson Date: 2010-02-19T17:29:34+09:00 Subject: Re: using secure memory On Fri, Feb 19, 2010 at 04:41:16PM +0900, Chad Perrin wrote: > I'm writing a utility that needs to use secure memory (that is, won't > swap to disk). Is there a "best practices" way to do this with Ruby, > some common library that could be used for this purpose, et cetera? What do you need to do exactly? Are you going to be allocating the memory yourself? If so, you might want to look for wrappers around mlock, and use the mmap gem. If you're talking about the entire ruby VM, I would suggest compiling your own Ruby, but modifying the memory allocators to use something like secmalloc: http://www.jabberwocky.com/software/secmalloc/ -- Aaron Patterson http://tenderlovemaking.com/