delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/10/13:23:41

Date: Sun, 10 Dec 2000 20:21:17 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: eplmst AT lu DOT erisoft DOT se
Message-Id: <3405-Sun10Dec2000202116+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <200012101521.QAA13985@lws256.lu.erisoft.se> (message from Martin
Stromberg on Sun, 10 Dec 2000 16:21:37 +0100 (MET))
Subject: Re: Why are we using offset_t and not off64_t?
References: <200012101521 DOT QAA13985 AT lws256 DOT lu DOT erisoft DOT se>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Martin Stromberg <eplmst AT lu DOT erisoft DOT se>
> Date: Sun, 10 Dec 2000 16:21:37 +0100 (MET)
> > 
> > Who says NTFS supports files larger than 2^32 natively?  Does it?
> 
> One source (at least): Microsoft WINDOWS 2000 Professional Resource
> Kit, ISBN 1-57231-808-2.
> Page 721, Table 17.5 NTFS Size Limits
> ------------------------------------------------------------------
> Description 			Limit
> ------------------------------------------------------------------
> Maximum file size 		2^64 - 1 KB (Theoretical)
> 				2^44 - 64 KB (Implementation)

So they support files up to 2^44, not 2^64.

> > > I guess you can't through DOZE/DJGPP.
> > 
> > Most definitelyly.  The DOS calls simply don't have enough bits in the 
> > registers to pass larger offsets.
> 
> Yeah, But what happens if we write 2^32 + some bytes? Perhaps it'll
> just grow over the limit or perhaps not...

If the people who wrote the NT DOS emulation are sane (a BIG
assumption, I know ;-), they won't let this happen, because for that
to be possible, the appropriate internal data structure, the
equivalent of the DOS SFT, must have a wider-than-32bit field to store
the current file pointer position.  And since the DOS lseek function
can only return a 32-bit value, guess what will happen with files
larger than 2GB...

- Raw text -


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