Author Topic: Can't read verlarge (10GB+) files on Windows 2000 and later.  (Read 2774 times)

Offline Hans-Linux

  • Multiple posting newcomer
  • *
  • Posts: 10
Can't read verlarge (10GB+) files on Windows 2000 and later.
« on: September 27, 2011, 04:41:00 pm »
I have been using Code::Blocks 10.5 for some time on 64bit OpenSuse 11.4 and written in 'C' a command line utility that searches a directory tree for files with identical size, compares the content and deletes files with identical content. The largest files tested was 19Gb.

The utility works fine. I want to port it to Windows and downloaded and installed on a 32 bit Win7 box:
codeblocks-10.05mingw-setup.exe

Everything works fine for files up to about 2Gb. Windows "FC.EXE" handles 19Gb. I searched the Forums, Google, etc. and can't find what's wrong. I believe the problem is caused by 32bit library functions.

The last time I coded for MS$ was for MS-DOS in 1995.

Any help will be appreciated.

Hans

 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Can't read verlarge (10GB+) files on Windows 2000 and later.
« Reply #1 on: September 27, 2011, 05:07:43 pm »
Read the rules of the forum (you're violating them!).
Then post in a windows api forum or read msdn.com
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Can't read verlarge (10GB+) files on Windows 2000 and later.
« Reply #2 on: September 27, 2011, 06:01:20 pm »
Besides, the reason why fc.exe has no trouble memory mapping a 19GB file under a 32 bit OS is that it doesn't. fc.exe reads one line at a time from a stream. Mapping something larger than the available address space in a single mapping is simply not possible, that has nothing to do with Windows, it would equally fail under OpenSuSE 32.

But, as oBFusCATed pointed out... wrong place to ask here.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."