Re: "out of memory"

New Message Reply Date view Thread view Subject view Author view

Allan Schaffer (allan++at++sgi.com)
Sun, 19 Sep 1999 11:55:46 -0700 (PDT)


On Sep 17, 4:11pm, Karen Harper wrote:
> I am getting an error that I find difficult to believe. I have a
> Performer application that dies on me with a simple "out of memory"
> error. I ran it while watching gmemusage and while it is getting close
> to the limit of my main memory, I don't think it actually hits it. Even
> so, I have plenty of swap available.
>
> I'm afraid I don't even know what is generating the error ... Performer,
> ViewKit, who knows. So, I'm not sure what other info to provide.

It's likely that the code involved is something like:

   foo = malloc (N);
   if (!foo)
   {
        printf ("Out of memory\n");
        exit(1);
   }

So as a generic debugging tip, run the program through 'dbx' (make
sure you're in single-process mode) and set a breakpoint on exit().
When you reach the breakpoint, type 'where' and you'll be able to see
the function leading to that message. This may provide some hints..

Allan

-- 
Allan Schaffer                                            allan++at++sgi.com
Silicon Graphics                           http://reality.sgi.com/allan

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Sun Sep 19 1999 - 11:56:09 PDT

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