Article View: comp.sys.next.programmer
Article #2213Re: Memory Allocation Error
From: Erich S. Boleyn
Date: Thu, 21 Jan 1993 12:08
Date: Thu, 21 Jan 1993 12:08
34 lines
1786 bytes
1786 bytes
bobb@agora.rain.com (Bob Beauchemin) writes:
> I'm having a problem with the NeXT 2.1 compiler and wonder if anyone else
>has experienced it. Code that compiles OK and works on other platforms
>fails on the NeXT. The error messages (at program execution) are:
> memory allocation error: attempt to free or realloc space not in heap
> bad zone
> IOT trap
I have seen this problem many times. It has always (so far at least)
been caused by attempting to call 'free' on a statically allocated string.
Interestingly enough, running this on SunOS seems to work just fine,
i.e. it ignores such requests and goes on without an eyeblink.
I've had to fix GNU readline, some berkeley daemons, helped a friend
with the really cool FTP daemon from wuarchive, etc. and this is in
many cases pretty much the only problem. Hint: always look for it! ;-)
Basically, your answer is to just bite the bullet and fix the bad
code that technically shouldn't have worked anyway, even though SunOS
and a few others are permissive.
Good luck,
Erich Boleyn
--
"I haven't lost my mind; I know exactly where it is."
/ -- Erich Stefan Boleyn -- \ --=> *Mad Genius wanna-be* <=--
{ Honorary Grad. Student (Math) }--> Internet E-mail: <erich@cs.pdx.edu>
\ Portland State University / WARNING: INTERESTED AND EXCITABLE
Technical Details
Message-ID:
<erich.727618096@alamo>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!mintaka.lcs.mit.edu!ogicse!pdxgate!alamo!erichReferences:
<C16K2t.HGC@agora.rain.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!mintaka.lcs.mit.edu!ogicse!pdxgate!alamo!erich From: erich@alamo.mth.pdx.edu (Erich S. Boleyn) Newsgroups: comp.sys.next.programmer Subject: Re: Memory Allocation Error Message-ID: <erich.727618096@alamo> Date: 21 Jan 93 12:08:16 GMT Article-I.D.: alamo.erich.727618096 References: <C16K2t.HGC@agora.rain.com> Sender: news@pdxgate.UUCP Lines: 34