ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/10/22/01:46:42

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT nohavenot DOT cmm>
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: <gdmej0$ije$1@aioe.org>
References: <gcbnih$6pq$1 AT aioe DOT org> <MOadnT7eV5OCQHfVnZ2dnUVZ_g6dnZ2d AT earthlink DOT com> <gcf1pk$6q8$1 AT aioe DOT org> <EfSdnbKNq9VBs3HVnZ2dnUVZ_jidnZ2d AT earthlink DOT com> <gclvag$mho$1 AT aioe DOT org> <gdes8d$aqo$1 AT aioe DOT org> <t7Wdna5FmpsFEGPVnZ2dnUVZ_oPinZ2d AT earthlink DOT com>
NNTP-Posting-Host: mQokHQeKeRC37oD/Mq9UYg.user.aioe.org
Mime-Version: 1.0
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" <cwsdpmi AT earthlink DOT net> 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

- Raw text -


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