Skip to content

Latest commit

 

History

History

big_file_operate

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

There is an example about how to read/write big file.Maybe two choices for windows programer,one is _wfopen_s,another is MapViewFile. MapViewFile is the First Choice,it's faster.

对大文件的处理,可以使用_wfopen_s,或者是内存映射文件,但应该优先选择内存映射文件,它更快。

注意:创建一个被写入文件的时候,需要在CreateFileMapping的时候设置文件大小,需要GENERIC_READ | GENERIC_WRITE 属性。MapViewOfFile的大小不能超过虚拟内存大小,所以必须分块映射。

[email protected]
2013.6.5