(转)windows下fopen遇到文件限制的解决方法
来源:互联网 发布:如何淘宝兼职 编辑:程序博客网 时间:2024/05/16 08:20
转自:http://blog.csdn.net/joyyoj/article/details/5447150
昨天遇到一个问题:打开shp文件到85个时,发现再添加shp就会报错。我一开始怀疑是缓存写的有问题,后来跟踪了下,才发现问题居然在fopen,又测试下一把fopen,如果fopen读取txt,发现在读取第510个文件时就会失败。于是怀疑是文件打开数目有限制,搜索了一把,更改config.NT重启计算机还是不行。最后是使用_setmaxstdio提高了上限。
MSDN里的描述如下:
C run-time I/O now supports many more open files on Win32 platforms than in previous versions. Up to 2,048 files can be open simultaneously at the lowio level (that is, opened and accessed by means of the _open, _read, _write, and so forth family of I/O functions). Up to 512 files can be open simultaneously at the stdio level (that is, opened and accessed by means of the fopen, fgetc, fputc, and so forth family of functions). The limit of 512 open files at the stdio level can be increased to a maximum of 2,048 by means of the _setmaxstdio function.
Because stdio-level functions, such as fopen, are built on top of the lowio functions, the maximum of 2,048 is a hard upper limit for the number of simultaneously open files accessed through the C run-time library.
- (转)windows下fopen遇到文件限制的解决方法
- windows下fopen遇到文件限制的解决方法
- Windows Server 2008R2 IIs7 上传文件限制的解决方法
- Linux(C/C++)下的文件操作open,fopen
- 【Python】Windows下安装MySQLdb遇到的问题及解决方法
- Windows下安装MySQLdb遇到的问题及解决方法
- Windows下安装MySQLdb遇到的问题及解决方法
- Windows 下安装ArcGIS Server9遇到的若干问题及其解决方法
- windows下安装openssl时遇到的几个问题和解决方法
- windows系统下C语言fopen打开文件路径介绍
- 使用PHP文件操作函数fopen()遇到的问题
- Windows下使用python-nmap库可能遇到的问题及解决方法(续)
- windows 环境下部署spark运行环境 (包含遇到的问题和解决方法)
- linux fopen打开大于2G文件出错的解决方法 (踩了一个大坑)
- windows 和linux下的fopen()的区别
- Windows环境下编译linux文件遇到的问题
- linux下读取windows文件遇到的问题
- phpmyadmin导入import文件限制的解决方法
- ArcGis卸载方法
- MFC下使用cvSetMouseCallback()的小结
- hdu 1011 Starship Troopers 简单树形DP
- 做人的底线如果你经历过你会流泪
- 在X64oracle服务器上增加X86客户端for Web
- (转)windows下fopen遇到文件限制的解决方法
- grep多个关键字“与”和“或”
- 24券创始人杜一楠的失败检讨书:我的“孩子”是如何死去的?
- thrift源码研究-TProtocol类体系架构分析
- 深入浅出MIPS 三 MIPS的协处理器CP0
- 数学建模竞赛中应当掌握的十类算法
- NSURL的用法
- 从C++转到Java 如何把握关键
- Core Java (十四) 接口,对象克隆,回调