delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/08/15:00:33

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <4166DE17.82290D05@yahoo.com>
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Free() crash my program!
References: <D7Kdnfji89etsfvcRVn-qA AT comcast DOT com> <41663c2c$0$179$cc7c7865 AT news DOT luth DOT se> <4166513D DOT 92D782BF AT yahoo DOT com> <01c4ad2e$Blat.v2.2.2$6d165ee0 AT zahav DOT net DOT il>
Lines: 28
Date: Fri, 08 Oct 2004 18:53:34 GMT
NNTP-Posting-Host: 12.76.142.242
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1097261614 12.76.142.242 (Fri, 08 Oct 2004 18:53:34 GMT)
NNTP-Posting-Date: Fri, 08 Oct 2004 18:53:34 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
> 
> > From: CBFalconer <cbfalconer AT yahoo DOT com>
> > Date: Fri, 08 Oct 2004 08:57:58 GMT
> >
> > Shouldn't there be some limit on the len parameter?  Just
> > considering the nature of the DOS memory addressing, I would expect
> > it to not work for anything over 65535.
> 
> dosmemget is a DJGPP function, it doesn't call any DOS interrupts, and
> so isn't limited by DOS limitations.
> 
> What dosmemget does is simply copy a block of memory from here to
> there, and it uses the fact that the conventional memory is mapped
> into a special segment of the DJGPP address space whose selector is
> _dos_ds and whose limit is 1MB + 64KB.  The code that copies the
> memory block runs in protected mode, using 32-bit registers for
> segment offsets.  Thus, there's no 64KB limit.  If you want, you can
> copy the entire DOS address space in one go.

i.e. len cannot be greater than 1M + 64KB - addr, no?

-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!


- Raw text -


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