title: maxevents parameter in epoll_wait() and the events array size
body: <p>In epoll usage, it is usually like the following:</p>
  
  <pre><code>struct epoll_event ev,events[20];
  epfd=epoll_create(256);
  。。。
  nfds=epoll_wait(epfd,events,40,500);
  </code></pre>
  
  <p>Some articles are saying that the <code>maxevents</code> parameter in <code>epoll_wait</code> (namely the <code>40</code> in <code>epoll_wait(epfd,events,40,500);</code>) should not exceed the size parameter in <code>epoll_create</code>(namely the <code>256</code>).</p>
  
  <p>I think the <code>maxevents</code> parameter should not exceed <code>20</code> in <code>ev, events[20]</code>, because events can only be registered to 20 events elements; otherwise, if there are 40 sockets which are active, then what will happen?</p>
  
  <p>BTW, if I register more than 20 sockets and there are more than 20 active events(sockets), but the events array <code>events[20]</code> has only 20 events, what will happen? </p>