This post originated from an RSS feed registered with Ruby Buzz
by Eric Hodel.
Original Post: Controlling Rails Process Size: Update
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
A while back Simon Lundström wrote me because he was having problems limiting process sizes using the Process::setrlimit as described in my previous post, Controlling Rails Process Size.
After some back-and-forth we found that on Debian, to limit process sizes use the Process::RLIMIT_MEMLOCK and Process::RLIMIT_AS constants.
On OS X we couldn’t find any RLIMIT_* constants that would effect a limit, nor when setting limits using the ulimit shell builtin. (Probably because OS X doesn’t use the UNIXy brk(2) syscall when you malloc(3) memory.) If somebody knows the magic to limit process size on OS X, I’d like to hear it.