Re: malloc troubles

New Message Reply Date view Thread view Subject view Author view

Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Thu, 10 Sep 1998 00:32:24 -0700


Raoul Becke wrote:
>
> Hi everyone,
> from time to time my application crashes when I'm allocating memory with
> new or malloc. I could alleviate this trouble by invoking
> pfSharedArenaBase((void*)0x18000000)) at the beginning of my program (as
> written in known problems and workarounds at
> http://www.sgi.com/Technology/Performer/relnotes2.2.html).
>
> Although my program still crashes in the malloc() process as the
> debugger showed me. This trouble I could fix temporarily by moving the
> responsible member variable out of the class declaration into the method
> where it is used. This solution isn't very satisfying so: Does anyone
> know a solution to this problem or can tell me where to find one?

So what is the nature of the crash? My guess is that you are stomping
the malloc header somewhere and that is what is causing your crash.
Typically, if malloc cannot allocate storage (heap can't grow because
another region is already present), it just returns NULL. This will
manifest a completely different problem.

- Phil

-- 
Phil Keslin			Silicon Graphics, Inc.
E-Mail: philk++at++sgi.com		2011 N. Shoreline Blvd. M/S 8U-590
				Mountain View, CA 94043

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Sep 10 1998 - 00:32:27 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.