delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/04/00:56:57

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108040452.AA14887@clio.rice.edu>
Subject: Updated crt0.S and crt0.h (Win2K fix)
To: djgpp-workers AT delorie DOT com
Date: Fri, 3 Aug 2001 23:52:48 -0500 (CDT)
Cc: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
In-Reply-To:
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

Partially tested, changes a bit too big for comfortable email.

I've put the updated crt0.S and crt0.h (with a small test image, diffs) on:
 ftp://clio.rice.edu/djgpp/crt0fix.zip
This has 3 sets of changes:

1) Checks setting of limits to see if wrap will work - if not it sets a
   new bit defined in crt0.h to disallow sbrk() address wrap.
   This was combined with the near pointer setup code.  You can manually
   set this bit if you want to disable wrapping in Win 9x.

2) In the sbrk() non-move code it checks the new bit definition if 
   address wrap would occur and may discard a DPMI memory block which 
   would cause addres wrap (which won't work on NT/2000/XP, will crash).
   
3) A new sbrk() block sizing algorithm.  Later allocated blocks will be 
   rounded up to a size bigger than 64K.  The maximum amount of potential
   loss/waste/unavailable memory due to bigger blocks is a maximum of 3% 
   of the total virtual address pool.  Many fewer memory handles are used
   (the 256 stored in crt0.S now will take you to 512Mb at smallest 
   allocations compared to 16Mb before) and allocations are much faster.
   A typical out of the box CWSDPMI and new crt0.S combination should take
   you to 2Gb of memory.  This also solves many problems using Pmode under
   HIMEM.SYS.

- Raw text -


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