delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/13/12:07:15

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Wed, 13 Mar 2002 18:58:00 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <9003-Wed13Mar2002185759+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <153702b153a9656b9b4eb20c28da0d7f.76722@mygate.mailgate.org>
(spanish AT ieee DOT org)
Subject: Re: new[] and delete[]
References: <153702b153a9656b9b4eb20c28da0d7f DOT 76722 AT mygate DOT mailgate DOT org>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Giovanni Spagnuolo" <spanish AT ieee DOT org>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 13 Mar 2002 12:21:51 +0000 (UTC)
> 
> As you can see, there are no memory bugs, but the maximum available
> memory is about 163MB, while I have 256MB of RAM installed.

As Hans-Bernhard told you, the real amount of memory might be more
than what is handed to your application, since there's an overhead
associated with each allocation.

I'd suggest to begin with running the `go32-v2.exe' program in the
same DOS box.  It will show how much memory does Windows let you use
in that DOS box.  I'd expect to see 2 numbers whose sum is something
close to 256MB.

Next, call `sbrk(0)' immediately when you start the program, and then
again when it allocates all the memory, and compute the difference
between the two values.  This will tell you how much memory did the
program request from Windows, including any overhead required by
internal heap management code.

If that doesn't give a clue, post the information here.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019