yujianwjj
V2EX  ›  Linux

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

By yujianwjj at 2017 年 8 月 24 日 · 3415 次点击

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 年 8 月 24 日
对
Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
© 2026 V2EX · 24ms · 3.9.8.5