Date: Thu, 2 Aug 2001 09:49:41 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Charles Sandmann cc: Andrew Cottrell , djgpp-workers AT delorie DOT com Subject: Re: Windows 2000/sbrk In-Reply-To: <10108011646.AA15315@clio.rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 1 Aug 2001, Charles Sandmann wrote: > My first thought is to add a new flag for the non-move sbrk() which will > prevent memory wrapped dpmi blocks from being used. This flag would always > be forced on if running on NT. It would also be useful option on Win9X > systems to prevent weird selectors that span the entire memory space. > This is probably easier to implement, but since we sbrk() the stack before > calling any setup code we would either leave a window of breakage or would > need to move dos version queries to crt0 :-P > > My next thought was to check the limit we set, and if it didn't "stick" to > toss the block and try again. Looking at how each bit is carefully crafted > in crt0 makes be believe this will cause some hair loss. I don't understand the difference between these two alternatives (_are_ they alternatives?). As I've said earlier, I don't see anything bad in testing the DOS version in crt0. It's a straightforward code, and it's short.