My programs come out of memory just like I ran them for more than half the time. Under linux, I can set the hard disk in available memory - ulimit -v mem-in-kbytes Actually, I use the Ulimit-S-V memory-in-kibeite, so I get proper memory allocation problem in the program and I can cancel it.
But ... OSX is not working in 10.6. I have tried with the -s and -m options, and they are not working.
In 2008, there was some discussion about the same issue, but did not offer any good alternatives. It should be a method in which it can learn that it is spending too much memory, or is setting a limit through the OS.
After struggling (with limited success) myself, I have decided that there are two ways to do this ...
You can set launch items for your executable. The important part is Plist, a segment such as ..
& lt; Key & gt; SoftResource limit & lt; / Key & gt; & Lt; Dict & gt; & Lt; Key & gt; Stack & lt; / Key & gt; & Lt; Integer & gt; 10000000000 & lt; / Integer & gt; & Lt; / Dict & gt; There are various keys available ... which can be found at
, I think , either Define a value in /etc/launchd.conf (system) or /etc/launchd-usr.conf (Peruser). For example, your launchd.conf might have ...
umask 002 border stack 67104768 67104768 limit maxproc 3400 4500 limit maxfiles 256 unlimited setenv PATH / opt / local / bin: / opt / Local / Sbin: / usr / bin: / bin: / usr / sbin: / sbin: / usr / local / bin: / usr / x11 / bin all the functionality of launchd There is a documentation for you if you ask me .. So it seems that if the apple can not care for people outside its walls, then they will understand how it all works. Musting must be done by launch and its complexities ... but there are some concrete / official resources available, which are available as a way of applying them properly.
Comments
Post a Comment