Path: utzoo!attcan!uunet!wuarchive!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!cica!iuvax!watmath!watcgl!andrewt From: andrewt@watsnew.waterloo.edu (Andrew Thomas) Newsgroups: comp.sys.amiga Subject: Re: task exceptions Message-ID:Date: 27 Sep 89 16:10:50 GMT References: <24642@louie.udel.EDU> Organization: University of Waterloo, Waterloo, Ontario, Canada Lines: 16 In-reply-to: A_HINDS%HVRFORD.BITNET@cornellc.cit.cornell.edu's message of 22 Sep 89 16:46:24 GMT In article <24642@louie.udel.EDU> A_HINDS%HVRFORD.BITNET@cornellc.cit.cornell.edu writes: Does 1.4 address this problem? Just what happened to the guru, anyway? Will the machine still go down when somebody frees memory twice? My question here is, why the hell doesn't the malloc/free pair have some kind of bit or magic number which it sets in the header block which says whether that segment of memory is allocated or freed, so the check can be done by free and the problem goes away forever. The only overhead is (perhaps as much as) 1 byte per memory segment, a compare and write in free, and a write in malloc. I'm willing to pay the three instructions for the safety it offers. -- Andrew Thomas andrewt@watsnew.waterloo.edu Systems Design Eng. University of Waterloo "If a million people do a stupid thing, it's still a stupid thing." - Opus