Mail Archives: djgpp-workers/2001/08/04/00:56:57
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 -