_setmaxstdio最大打开的文件只有2048? [英] _setmaxstdio max open files is 2048 only?

查看:557
本文介绍了_setmaxstdio最大打开的文件只有2048?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://msdn.microsoft.com/ EN-US /库/ 6e3b887c%28VS.80%29.aspx

有没有办法使用_wopen有超过2048个打开的文件在每个应用程序的时候。

is there a way to have more than 2048 open files at a time per application using _wopen.

32或64位操作系统 - 同样的限制

32 or 64 bit OS – same limit!

推荐答案

没有。

我相信限制有从CreateProcess的调用继承打开的文件的能力去做。所述的CreateProcess只​​有2048传递柄(均在32位和64位)的插槽。您可以调试程序,并进入系统,EXEC或产卵CRT函数看到2048插槽的限制。

I believe the limit has to do with the ability to inherit the open files from a CreateProcess call. The CreateProcess has only 2048 slots for passing handles (both on 32-bit and 64-bit). You can debug a program and step into the system, exec, or spawn CRT functions to see the limit of the 2048 slots.

如果您使用Win32文件API(的CreateFile,WriteFile的,ReadFile的,CloseHandle的,等等),那么你不必打开文件(限制好了,你这样做,但我相信它是基于您的资源,如内存)。

If you use the Win32 file API (CreateFile, WriteFile, ReadFile, CloseHandle, etc.), then you don't have a limit on open files (well, you do but I believe it is based on your resources like memory).

这篇关于_setmaxstdio最大打开的文件只有2048?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆