🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4989

Re: Memory Protection!

#4989
From: Fred Gilham
Date: Thu, 23 Aug 1990 13:37
26 lines
1751 bytes
Charlie Gibbs writes:
----------------------------------------
     So could a Unix guru please enlighten me?  Is it actually
considered evil to free memory yourself, or is it one of those
conventions that just grew?
----------------------------------------

I'm not claiming to be a unix guru, just the voice of experience.
When I came to my current job I inherited a piece of software that
generates expert systems.  I started using these expert systems to
process large quantities of events, and ended up dumping 32 meg cores.
It turned out that there were memory leaks (failure to free() after
malloc()) and also the expert systems didn't check all their calls to
malloc() to make sure they succeeded.  The result was that the virtual
memory would be exhausted, malloc would return NULL, the program would
try to use the NULL value as a real address, and the program would get
aborted and write out a core file.

Moral:  Someone might use your program to do real work.  Make sure you
handle memory correctly.
--
Fred Gilham    gilham@csl.sri.com
The emotional quality of what we moderns call our thought produces an
extreme violence of conviction combined with extreme incoherence in
our arguments.  --Jacques Ellul
Technical Details
Message-ID: <GILHAM.90Aug23063725@cassius.csl.sri.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!usc!apple!hercules!gilham
References: <2905@mindlink.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!usc!apple!hercules!gilham
From: gilham@csl.sri.com (Fred Gilham)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Memory Protection!
Message-ID: <GILHAM.90Aug23063725@cassius.csl.sri.com>
Date: 23 Aug 90 13:37:25 GMT
References: <2905@mindlink.UUCP>
Sender: usenet@csl.sri.com
Organization: Computer Science Lab, SRI International, Menlo Park, CA.
Lines: 26
In-reply-to: a218@mindlink.UUCP's message of 21 Aug 90 21:43:52 GMT