Date: Mon, 30 Mar 1998 14:10:24 +0300 (IDT) From: Eli Zaretskii To: Nate Eldredge cc: Edward Cashin , djgpp AT delorie DOT com, Charles Sandmann Subject: Re: djgpp malloc and freeing memory on exit In-Reply-To: <199803292223.OAA18960@adit.ap.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 29 Mar 1998, Nate Eldredge wrote: > It seemed likely to me that they needed to be explicitly freed, judging from > the trouble DJGPP's exit code goes to to free them (the 16-bit exit code and > so forth). Is that just paranoia, then? No, not paranoia. AFAIK, some DPMI hosts (Windows?) don't free the selectors we are allocating for special needs, like the 16-bit sbrk helper. I think the code you see was added to work around those DPMI hosts and prevent selector leeks. But the selectors allocated by the 32-bit code, including those allocated by calling the DPMI functions, are automatically cleared, IIRC. Charles, is this correct?