在注册表中:
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Windows/USERProcessHandleQuota]
XP上缺省是10000
另,根据MSDN描述,C运行库在Windows中打开文件数的限制如下:
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.
本文介绍Windows系统中文件句柄的数量限制及C运行库在不同级别上同时打开文件的最大数量。XP系统默认文件句柄配额为10000,而C运行库在Win32平台上支持更多并发文件操作,在低IO级别最多可同时打开2048个文件,在stdio级别最多可打开512个文件,通过_setmaxstdio函数可将后者上限增至2048。
863

被折叠的 条评论
为什么被折叠?



