delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/07/26/07:30:08

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Received: by 10.224.36.15 with SMTP id r15mr60875492qad.8.1374837257629;
Fri, 26 Jul 2013 04:14:17 -0700 (PDT)
X-Received: by 10.49.3.104 with SMTP id b8mr1719903qeb.25.1374837257587; Fri,
26 Jul 2013 04:14:17 -0700 (PDT)
Newsgroups: comp.os.msdos.djgpp
Date: Fri, 26 Jul 2013 04:14:17 -0700 (PDT)
In-Reply-To: <_LednZbOz8-XIGzMnZ2dnUVZ_tednZ2d@earthlink.com>
Complaints-To: groups-abuse AT google DOT com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=217.91.63.120;
posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr
NNTP-Posting-Host: 217.91.63.120
References: <rNWdnSFu4b2QMtfWnZ2dnUVZ_tmdnZ2d AT earthlink DOT com>
<788e2b72-ab43-4ae4-8401-97db486d2615 AT googlegroups DOT com> <_LednZbOz8-XIGzMnZ2dnUVZ_tednZ2d AT earthlink DOT com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4693e236-4ebc-485c-b5fe-ef9606b97dd7@googlegroups.com>
Subject: Re: Beta Test: CWSDPMI r7 - 4GB support
From: Georg Potthast <dosusb AT googlemail DOT com>
Injection-Date: Fri, 26 Jul 2013 11:14:17 +0000
Bytes: 2971
Lines: 56
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
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

Thank you very much for the information. I did not know about these functions and will try that.

Georg

Am Freitag, 26. Juli 2013 02:04:22 UTC+2 schrieb Charles Sandmann:
> >"Georg Potthast" <dosusb AT googlemail DOT com> wrote in message 
> 
> >news:788e2b72-ab43-4ae4-8401-97db486d2615 AT googlegroups DOT com...
> 
> >I have a question which I do not know if this related to CWSDPMI. I develop 
> 
> >my programs in a Windows XP DOS box and they >work fine there. When I then 
> 
> >try them in real mode DOS they crash due to uninitialized pointers. So I 
> 
> >have to work through the >program again and fix that. But some of these 
> 
> >problems I may not find and my users observe crashes.
> 
> 
> 
> >Does Windows DPMI set the allocated memory to zero for you while CWSDPMI 
> 
> >does not? Then a "char* mystring;" is set to >NULL by Windows.
> 
> 
> 
> CWSDPMI does not initialize the memory (to improve performance).  On a 
> 
> single process system, there is no need to do this if the program is 
> 
> properly written (no security issues leaking data).
> 
> 
> 
> To find these pointers (or to simply fix it), DJGPP has two features which 
> 
> allow you to fill the memory, see crt0.h:
> 
> 
> 
> /* If set, fill sbrk()'d memory with a constant value.  If not, memory
> 
> ** gets whatever happens to have been in there, which breaks some
> 
> ** applications. */
> 
> #define _CRT0_FLAG_FILL_SBRK_MEMORY             0x0020
> 
> 
> 
> /* If set, fill memory (above) with 0xdeadbeef, else fill with zero.
> 
> ** This is especially useful for debugging uninitialized memory problems. */
> 
> #define _CRT0_FLAG_FILL_DEADBEEF                0x0040

- Raw text -


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