Windows 相当于 ulimit -n
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/729162/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows equivalent of ulimit -n
提问by maximus1986
What is the windows equivalent of the unix command " ulimit -n" ?
与 unix 命令“ulimit -n”等效的 Windows 是什么?
Basically, i want to set the maximum fd limit via command prompt.
基本上,我想通过命令提示符设置最大 fd 限制。
采纳答案by Marc Gravell
hmm... I may have been wrong before - setmaxstdio (see here) - but it is per-process, not system wide.
嗯...我之前可能错了 - setmaxstdio(见这里) - 但它是针对每个进程的,而不是系统范围的。
I may be wrong, but I didn't think there was a limit to set in Windows...but unless you can say how this relates to programming, I expect this answer will be closed soon.
我可能是错的,但我认为在 Windows 中没有设置限制......但除非你能说出这与编程的关系,否则我希望这个答案很快就会结束。
If you are in the "IT Pro" area (rather than development), then there is a sister-site, serverfault.com - coming soon for this type of question.
如果您在“IT Pro”领域(而不是开发),那么有一个姊妹站点 serverfault.com - 即将推出此类问题。
回答by Alnitak
I don't believe that current Windows O/S have a limit on the totalnumber of file descriptors, but the MS runtime library (msvcrt.dll
) has a per processlimit of 2048, albeit as far as I know that's not enforced by the O/S.
我不相信当前的 Windows O/S对文件描述符的总数有限制,但是 MS 运行时库 ( msvcrt.dll
) 的每个进程限制为 2048,尽管据我所知,O/ S。
It can allegedly be increased only by building your own version of the MS runtime library from source.
据称只能通过从源代码构建您自己的 MS 运行时库版本来增加它。