delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/08/08:03:13

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Fri, 08 Oct 2004 13:59:35 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-ID: <01c4ad2e$Blat.v2.2.2$6d165ee0@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <4166513D.92D782BF@yahoo.com> (message from CBFalconer on Fri, 08
Oct 2004 08:57:58 GMT)
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>
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

> 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.

See the library sources for the gory details.

- Raw text -


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