🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Catching free memory violations

#661
From: Deven T. Corzine
Date: Mon, 31 Jul 1989 19:42
30 lines
1718 bytes
On 30 Jul 89 21:27:01 GMT,
rosenber@ra.abo.fi (Robin Rosenberg INF) said:

Robin> In article <3985@cps3xx.UUCP>, usenet@cps3xx.UUCP (Usenet file
Robin> owner) writes:
porkka> 		Forbid();
porkka> 		FreeMem(x,len);
porkka> 		playsomemore(x);
porkka> 		Permit();

porkka> Now if you go zeroing things out at the FreeMem call, you can
porkka> potentially screw somebody up.

Robin> FreeMem is just that. It gives the memory _back_ to the system
Robin> which is then free to tag and use the memory anyway it wants
Robin> to. Using free'd memory is a bad habit. Get rid of it. It does
Robin> not work. Forbid() doesn't help.

And yet, it IS assumed to be safe, if you're forbidden.  (It *may*
even be (semi) officially sanctioned.  But I wouldn't count on it.)
Regardless, people *expect* this to work, and it would help not to
break it without needing to.

Deven
--
Deven T. Corzine        Internet:  deven@rpi.edu, shadow@pawl.rpi.edu
Snail:  2214 12th Street, Troy, NY 12180       Phone:  (518) 271-0750
Bitnet:  deven@rpitsmts, userfxb6@rpitsmts     UUCP:  uunet!rpi!deven
Simple things should be simple and complex things should be possible.
Technical Details
Message-ID: <SHADOW.89Jul31154235@pawl.rpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!pawl!shadow
References: <7408@ecsvax.UUCP> <694@jc3b21.UUCP> <3985@cps3xx.UUCP> <148@ra.abo.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!pawl!shadow
From: shadow@pawl.rpi.edu (Deven T. Corzine)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Catching free memory violations
Message-ID: <SHADOW.89Jul31154235@pawl.rpi.edu>
Date: 31 Jul 89 19:42:35 GMT
References: <7408@ecsvax.UUCP> <694@jc3b21.UUCP> <3985@cps3xx.UUCP>
 <148@ra.abo.fi>
Sender: usenet@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY
Lines: 30
In-reply-to: rosenber@ra.abo.fi's message of 30 Jul 89 21:27:01 GMT