Re: I can malloc more memory than I have.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Monday, October 26, 1992 - 2:33 pm

In article <1992Oct26.180801.28536@sfu.ca>, rchen@fraser.sfu.ca (Robert Chen) writes:
|> In article <1992Oct26.083011.17192@fys.ruu.nl> hooft@fys.ruu.nl (Rob Hooft) writes:
|> >In <1cfislINNeiu@tartarus.uwa.edu.au> oreillym@tartarus.uwa.edu.au (Michael O'Reilly) writes:
|> >
|> >>Try re-writing your program to malloc the memory, and then memset()
|> >>over it. Your machine will die. :) The malloc() is very unlikely to
|> >          ^^^^^^^^^^^^^^^^^^^^^
|> ...
|> >
|> >Aha! So it dies and doesn't die at the same time? Well: It doesn't die. It
|> >just starts making a core dump. But it has only a few buffers left, so it
|> >will take a loooooong time to finish it. I once had a 20MB core dump because
|> >I ran out of memory. It took linux about 40 minutes to finish dumping,
|> >but it came out unharmed.
|> >
|> >Don't be afraid. Don't be impatient. It won't die. 
|> >
|> >-- 
|> >Rob W.W. Hooft,  Department of crystal and structural chemistry
|> 
|> Bob, I know you are a big advocate of the "linux will not die" camp,
|> but we have to be reasonable.  If I told my boss I was going out for
|> lunch for 40 minutes because my workstation was busy creating a core
|> file, I don't think he would be too sympathetic.  
|> 
|> Does anybody know what would be involved in setting up some kind of
|> SysV like limits so that a few more buffers are left around when
|> linux runs out of virtual memory?  Linux uses GCC as its compiler ->
|> GCC uses virtual memory like it is going out of style == lots
|> of people waiting 40 minutes for core files to appear.
|> 
|> - Rob Chen
|>    

I just tell my shell not to dump core:

1. Save space.
2. Save time.

My shell will tell me my process gets a signal but not dump core. Then I
just run

gdb foo

H.J.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: I can malloc more memory than I have., H.J. Lu, (Mon Oct 26, 2:33 pm)