X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: failure of __dpmi_set_segment_limit() problem Date: Wed, 22 Oct 2008 01:43:20 -0400 Organization: Aioe.org NNTP Server Lines: 24 Message-ID: References: NNTP-Posting-Host: mQokHQeKeRC37oD/Mq9UYg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse AT aioe DOT org NNTP-Posting-Date: Wed, 22 Oct 2008 05:44:00 +0000 (UTC) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933 X-Newsreader: Microsoft Outlook Express 6.00.2800.1933 X-Priority: 3 X-MSMail-Priority: Normal To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Charles Sandmann" wrote in message news:t7Wdna5FmpsFEGPVnZ2dnUVZ_oPinZ2d AT earthlink DOT com... > You are not flagging to sbrk() that you have changed the segment limit; so > when you call anything which calls sbrk() that requires it resize the memory > it resets the limit. Don't set the limit to -1 manually, call > _djgpp_nearptr_enable instead or look at it's source to see which flags need > setting. There are some old FAQ and usenet articles about this if you > search long enough..., but the easy thing is to call the libc function. > Thanks. Maybe it's just me, but I'd consider that to be bug in sbrk()... the limit is already maxed. Yes, this program doesn't specifically need that method and could use _djgpp_nearptr_enable. However, I think a couple other programs I've got may need that method. I recall there was some reason I didn't want to change cs. I looked over the _djgpp_nearptr_enable code previously but didn't see anything that indicated information was passed to other routines. I'll look over it again, and sbrk() and the crt0 stuff... RP