Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!rex!ukma!cs.widener.edu!netnews.upenn.edu!msuinfo!convex.cl.msu.edu!jap From: jap@convex.cl.msu.edu (Joe Porkka) Newsgroups: comp.sys.amiga.programmer Subject: Re: Problems with SAS/C 'malloc' Message-ID: <1991Mar20.184327.27539@msuinfo.cl.msu.edu> Date: 20 Mar 91 18:43:27 GMT References: <1991Mar18.152653.11750@decuac.dec.com> Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 25 baker@wbc.enet.dec.com writes: >-Message-Text-Follows- > This weekend, I ran into a problem with malloc(). I'm > using SAS/C 5.10 (*not* 5.10a) running under AmigaDOS 1.3.2 > on a B2000 with a GVP accelerator and 5 megs of memory. > The symptom: When I call malloc() with a request that's larger > than the current available space (as indicated by sizmem()), > it calls getmeml() to add more space to the heap, and getmemll() > GURU's the system. I used CPR to trace the problem into getmeml(), > The program I'm working on is large and rather complex, and the ^^^^^^^^^^^^^^^^^^^^^^^^ Most likely your program is a fault - it is tromping on memory that it ought not. Perhaps you over (or under) step a malloced array, thusly trashing the booking info malloc keeps at the head of each malloced block? Or, you simply have a wild pointer that gets reliably pointed at the wrong location.