Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.i386 Subject: Re: Memory Fault, core Dumped (ISC 2.0.1) Message-ID: <1990Feb12.020708.17729@virtech.uucp> Date: 12 Feb 90 02:07:08 GMT References: <454@telxon.UUCP> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 34 In article <454@telxon.UUCP> gorpong@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 | +-----------------------------------------------------------------------+