Mail Archives: djgpp/1997/09/30/11:46:43
From: | Erik Max Francis <max AT alcyone DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Problems with malloc/new
|
Date: | Tue, 30 Sep 1997 07:57:31 -0700
|
Organization: | Alcyone Systems
|
Lines: | 23
|
Message-ID: | <3431135B.72F7CDA6@alcyone.com>
|
References: | <342CA243 DOT 7035 AT must DOT die>
|
NNTP-Posting-Host: | newton.alcyone.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Gavin Sinclair wrote:
> With malloc, I was finding that it SOMETIMES fails. That is, I'd run
> the exact same executable several times in a row, and about half the
> time my debugging apparatus (printing to a file) would post-humously
> report that the pointer I had tried to allocate was 0.
>
> Giving up, I used new instead, and now, again about half the time, the
> entire program fails, saying "Virtual memory exceeded by 'new'". At
> least with malloc the program ran! (With only one side-effect, too).
No one can answer your question until you give us context. Find the
_smallest program_ (and I do mean smallest; don't just paste in the code
to your application) that reproduces your problem -- preferably by
writing it from scratch.
--
Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
Alcyone Systems / http://www.alcyone.com/max/
San Jose, California, United States / icbm://+37.20.07/-121.53.38
\
"After each war there is a little / less democracy to save."
/ Brooks Atkinson
- Raw text -