Chinaunix

标题: 请教一个超级难的问题! [打印本页]

作者: bskay    时间: 2003-04-15 16:15
标题: 请教一个超级难的问题!
如何产生一个超大文件(5G左右的)
指定用STL的标准库ofstream

附:如果用fopen系列要设置编译选项 -D_LARGE_FILE
作者: shanhan    时间: 2003-04-15 16:33
标题: 请教一个超级难的问题!
haha  !
作者: bskay    时间: 2003-04-16 08:28
标题: 请教一个超级难的问题!
[quote]原帖由 "shanhan"]haha  ![/quote 发表:


不要笑了,知道请回答啊!嘿嘿!
作者: fhbkyo    时间: 2003-04-18 09:36
标题: 请教一个超级难的问题!
数据库文件,如果不限空间的话可以达到你的硬盘差不多大
作者: bskay    时间: 2003-04-18 15:46
标题: 请教一个超级难的问题!
[quote]原帖由 "fhbkyo"]数据库文件,如果不限空间的话可以达到你的硬盘差不多大[/quote 发表:


我是想要用STL,因为有很多老程序!

请别离题!!
作者: itisok96    时间: 2003-04-26 20:58
标题: 请教一个超级难的问题!
好像不用stl就可以,研究中
作者: georgio    时间: 2003-05-03 22:03
标题: 请教一个超级难的问题!
system commands can do that for you:
Sun:  mkfile -n 1024m /tmp/bigfile
HP:    prealloc /tmp/bigfile 1048576000
AIX:  lmktemp  /tmp/bigfile 1024m
RedHat:
   dd if=/dev/zero of=/tmp/bigfile bs=1024 count=1048576000
   chmod 0600 /tmp/bigfile
   mkswap 1048576000 /tmp/bigfile


Or, you can look at the manpages for these commands, some of them will tell you the correspondent system call on that platform.

Good luck




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2