What am I missing here?
On a 32 bit operating system the largest signed int is ~ 2Gb (2^31) and the largest unsigned int is ~ 4Gb (2^32). These are therefore the largest addresses/ pointers/ offsets/ what-have-you's available which limits in-memory processing to 2Gb/ 4Gb - I can't see how there could be any way around this. You could probably use low level disk access to do on-disk manipulation (which may be what the available utilities do).

On 07/11/2013 02:53, Richard Kaye wrote:
Having a little play with the LLIO stuff in VFP2C, Mike, and it looks like it 
can handle files over 2GB which is not a real surprise since this library is a 
wrapper around the Windows API.

The file I tried this with is ~2.7GB. It took about 5 minutes to go through the 
file. FGetsEX returns data from the current position in the file up to the 
first CRLF or the number of bytes in the 2nd param. Obviously I'm not doing 
anything with the output other than moving the pointer.

ACTIVATE SCREEN
CLEAR
SET ESCAPE ON
IF NOT [vfp2c]$LOWER(SET("Library"))
   SET LIBRARY TO c:\rfc\vfp2c32.fll
ENDIF
@ 3,5 SAY DATETIME()
@ 4,5 SAY GETFILESIZE([c:\rfc\temp\bigfiles\giantfile.log])
m.nh=FOPENEX([c:\rfc\temp\bigfiles\giantfile.log])
m.lnI=0
IF m.nh>0
   DO WHILE NOT FEofEX(m.nh)
     FGetsEX(m.nh,8192)
     m.lni = m.lni + 1
     IF MOD(m.lni,10000)=0
       @ 5,5 SAY TRANSFORM(m.lni)
     ENDIF
   ENDDO
   ?FCloseEX(m.nh)
   @ 7,5 SAY DATETIME()
ENDIF

--
rk

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Richard Kaye
Sent: Wednesday, November 06, 2013 1:56 PM
To: [email protected]
Subject: RE: Working with text files larger than 2GB (VFP9SP2)

Check out the VFP2C32 VFPX project. It has LLIO functions that may work with 
larger files than VFP can handle natively.

--
rk


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to