V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
yujianwjj
V2EX  ›  Linux

poll/epoll 关于突破 1024 限制的疑问?

  •  
  •   yujianwjj · 2017-08-24 15:45:13 +08:00 · 2625 次点击
    这是一个创建于 2429 天前的主题,其中的信息可能已经有所发展或是发生改变。

    select 有 1024 限制的原因,是因为types.h中设置了#define FD_SETSIZE 1024

    但是在 linux 系统上面,ulimit -n 查看,maximum number of open file descriptors 是 1024。这个是系统的限制。

    那么,在使用 poll 和 epoll 的时候,是不是先要修改系统的这个限制。

    1 条回复    2017-08-24 15:57:32 +08:00
    enenaaa
        1
    enenaaa  
       2017-08-24 15:57:32 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3891 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 05:06 · PVG 13:06 · LAX 22:06 · JFK 01:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.