From: jrs@world.std.com (Rick Sladkey) Subject: Re: ghostscript/ghostview errors Date: Fri, 28 Aug 1992 03:07:33 GMT
>>>>> On Thu, 27 Aug 1992 03:53:46 GMT, jliddle@rs6000.cmp.ilstu.edu
>>>>> (Jean Liddle) said:
Jean> Both ghostview 1.3 and ghostscript 2.5 (from
Jean> gatekeeper.3com.com) compiled flawlessly under linux 0.97.1 and
Jean> gcc 2.2.2. (linux 0.97.1 was installed over the SLS 0.96
Jean> installation). When trying to display some files, such as
Jean> "cheq.ps", "chess.ps", and one of the linux logos, I get the
Jean> message "Dynamic memory exhausted." in my xconsol. Does anyone
Jean> know how to prevent this from happening? Is there a workaround
Jean> or compilation option I may have overlooked?
The first thing I would check is that you have included stdlib.h in
the files with the malloc calls. Linux malloc returns NULL when
malloc(0) is called and this confuses many programs into thinking all
memory is gonzo. See the GCC FAQ for details. BTW, this is the same
problem that causes olvwm to abort when trying to use various menu
functions. Either recompile using stdlib.h or change the malloc
return check to "result == NULL && amount != 0" or somthing similar.