Actually, those are not the droids you are looking for.
This question has been asked and answered in the list archives several times, plus documented in the man pages and elsewhere. Googling for "administrative limits" in the list archives would find this immediately.
The setrlimit limits are mostly voluntary enforcement. That means for things like working set size, your program has to do resource tracking and voluntarily enforce the limits on itself. There are a number of programs, like gcc, which will do this to try and be good resource citizens and play nice with the other programs.
Alternately you can /turn off/not turn on in the first place/ the dynamic pager (I'm pretty sure Tom was tongue in cheek, but that's how things are on the iPhone, where he does most of his work).
-- Terry On Aug 5, 2009, at 8:27 AM, Roger Herikstad < email@hidden> wrote: Hi, Thanks! This is exactly what I needed.
~ Roger On Wed, Aug 5, 2009 at 11:02 PM, A.M. <email@hidden> wrote:
On Aug 5, 2009, at 10:57 AM, Roger Herikstad wrote:
Hi list, I was wondering if there is a way to set a limit on how much
virtual memory the operating system should be allowed to allocate? I have a
MacPro with 16G of memory running 10.5.6. When using 64 bit applications to
analyze big data sets it happens occasionally that the application requests
more memory than can be accommodated on the system. As a result, pages are
written to disk until there's no more disk space available, which hangs the
machine.. Is there a way to change this behavior, such that I would get a
memory allocation error instead when (some times accidentally) trying to
allocate such huge chunks of memory? Thanks!
See "man setrlimit".
Cheers, M
|