delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/06/04:32:03

Date: Fri, 06 Jul 2001 11:22:09 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Daniel Barker <sokal AT holyrood DOT ed DOT ac DOT uk>
Message-Id: <2593-Fri06Jul2001112207+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <Pine.SOL.4.33.0107060107100.29532-100000@holyrood.ed.ac.uk>
(message from Daniel Barker on Fri, 6 Jul 2001 01:12:27 +0100 (BST))
Subject: Re: malloc() problem, DJDEV 203
References: <Pine DOT SOL DOT 4 DOT 33 DOT 0107022250120 DOT 27631-100000 AT holyrood DOT ed DOT ac DOT uk>
<200107022219 DOT SAA04299 AT envy DOT delorie DOT com> <Pine DOT SOL DOT 4 DOT 33 DOT 0107030043180 DOT 14632-100000 AT holyrood DOT ed DOT ac DOT uk>
<200107022351 DOT TAA05124 AT envy DOT delorie DOT com> <Pine DOT SOL DOT 4 DOT 33 DOT 0107030132070 DOT 19125-100000 AT holyrood DOT ed DOT ac DOT uk>
<200107030107 DOT VAA05731 AT envy DOT delorie DOT com> <Pine DOT SOL DOT 4 DOT 33 DOT 0107060107100 DOT 29532-100000 AT holyrood DOT ed DOT ac DOT uk>
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

> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 6 Jul 2001 01:12:27 +0100 (BST)
> From: Daniel Barker <sokal AT holyrood DOT ed DOT ac DOT uk>
> 
> How about if DJGPP malloc() always returned NULL (without even trying) for
> any allocation request exceeding n bytes, where n is the size of the
> largest dynamic array one can ever get with DOS/DPMI?

It turns out this is next to impossible to do: some DPMI hosts lie
about the largest allocation they can satisfy.

So in the next release of DJGPP, malloc will fail any attempt to
allocate more than 2GB - 64KB + 1 (we subtract 64KB because sbrk
rounds up the allocations to the nearest multiple of 64KB, before it
asks the DPMI server for more memory).

- Raw text -


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