LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   OOM has gone all tantric on me (https://www.linuxquestions.org/questions/programming-9/oom-has-gone-all-tantric-on-me-27247/)

rafe 08-05-2002 10:35 AM

OOM has gone all tantric on me
 
First off, I should say that I'm gnu to linux & linux programming.

I have this little c-proggie that's is, I admit, a total resource hog with huge arrays & cycles. The OOM is killing it after random intervals... normally, in a multi-user environment, this would be a good thing. However, the job will only be run on a machine(s) temporarily dedicated to it.

OK, I've gotta chunk the job eventually, however doing this will severely compromise efficiency (during the reconstitution phase) so I want to make the job chunks as large as possible.

Whew, all that & no question yet... The question is: In your experience, what is the best way to torque back the OOM? Even better, if it's possible, what is the best way to temporarily get that beastie to back off a bit?

TIA
rafe

rafe 09-10-2002 04:48 PM

partial solution
 
only because I don't like leaving threads unresolved... not that I beleive that anyone's really interested (-;

the key is to memory map the out of control big structures. It allows me to treat the memory mapped file as sort of a private swap space. The program is going to thrash a bit but that was going to happen anyway. & I dont have to chunk the passes which makes for a much easier code.

I haven't got all of the mmap intricacies worked out yet but the program is doing what it's supposed to w/o OOM bitin' me in the arse.

mmap()... a handy function to know.


All times are GMT -5. The time now is 04:06 AM.