File size limit
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Nov 24 16:30:09 UTC 2005
I did a bunch of work a few years back to ensure 64bit values were
used when dealing with
file related pointers. Of course most file systems have a lower
limit, say 48bit.
So It should open a 2.9GB file.
In checking it is possible (on some systems) to create a sparse file
of many gazillion bytes by seeking to a particular position and
writing a byte.
That adds a lots of digits when you do a ls -l
So on my freebsd box I can do
%dd if=/dev/zero of=jmmfoo bs=1k count=1 seek=1073741824
1+0 records in
1+0 records out
1024 bytes transferred in 0.000211 secs (4853070 bytes/sec)
%ls -l jmmfoo
-rw-r--r-- 1 johnmci wheel 1099511628800 Nov 24 09:06 jmmfoo
In squeak
File 'jmmfoo' is 1099511628800 bytes long.
You may use the 'get' command to read the entire file.
Here are the first 5000 characters...
------------------------------------------
I'll note comments could be nice here 1,099,511,628,800
StandardFileStream oldFileNamed: 'johnmci:jmmfoo'
self position: 1099511628000.
self nextPut: $a.
self flush.
self close.
reopen
self position: 1099511628000.
self next { & inspect I have my $a}
works fine.
PS The OS-X carbon VM uses the same file code as the unix port btw.
On 24-Nov-05, at 5:38 AM, Diego Gomez Deck wrote:
> Hi folks,
>
> Trying to open a large file (about 2.9G) I get error in Squeak.
>
> Is there any limit for the size of files?
>
> I'm using Linux VM.
>
> Cheers.
>
> -- Diego
>
>
>
> --
> ===========================================
> Diego Gomez Deck
> -------------------------------------------
> http://www.small-land.org
> http://www.consultar.com/DiegoGomezDeck/
> ===========================================
>
>
>
>
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|