Memory Fault, core Dumped (ISC 2.0.1)

Conor P. Cahill cpcahil at virtech.uucp
Mon Feb 12 13:07:08 AEST 1990


In article <454 at telxon.UUCP> gorpong at telxon (Gordon C. Galligher) writes:
>a Memory Fault, Core Dumped message.  At first I thought it had to do with
>not having enough memory, but I have 4 Meg. and I'm not running hardly
>any processes.

A memory fault/core dump is not caused by the system having too little memory,
in fact, virtual memory stuff should allow you to have lots of 4 meg programs
on your 4 meg system (provided you have the swap space).

Memory faults come from an abuse of the memory architecture of your program.  
This is most often caused by an invalid pointer or by running beyond the end
of array (to the end of memory, or just far enough to trash a nearby pointer).

>  An example is a program I wrote (unrm, will be out in
>comp.sources.unix soon) which makes some malloc() calls.  If I am root,
>and I attempt to allocate 524 bytes it fails.  It doesn't return from the

I hope Rich sees this and sends you back the program.  You should never 
release a program that generates a core dump under any circumstances (if 
possible).  Use the debugger to determine where your problem is.

As a side note, I posted a malloc() debugging library that can be used to 
assist in the debugging of these kinds of problems to alt.sources about
2 weeks ago.   I will be making a few more modifications based upon feedback
and then posting it to comp.sources.unix or comp.sources.misc.  

If you would like a copy now, send me a message.


-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.i386 mailing list