Advertisement

探讨epoll_create的size和创建出的句柄是否需要close

阅读量:

size

epoll_create函数的定义形式如下所示:
int epoll_create(int size);
在此定义中,参数size所代表的具体意义仍需进一步探讨。首先可查阅官方提供的相关文档资料:

gun库里的注释

复制代码
    /* Creates an epoll instance.  Returns an fd for the new instance.
       The "size" parameter is a hint specifying the number of file
       descriptors to be associated with the new instance.  The fd
       returned by epoll_create() should be closed with close().  */
    extern int epoll_create (int __size) __THROW;
    
    
      
      
      
      
      
    

Linux man手册解析

复制代码
    EPOLL_CREATE(2)            Linux Programmer's Manual       

全部评论 (0)

还没有任何评论哟~