eloop: dynamically reallocate dispatch cache
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 19 May 2012 11:47:55 +0000 (13:47 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 19 May 2012 11:47:55 +0000 (13:47 +0200)
commit0b8da0ce5027127e25b0c72e70201a4fcb92a09b
tree5f945fdef59160b5a40e3ea7e34a14f2a4f08ab1
parent56d79325239987080840d5f0449712f31fa8ad26
eloop: dynamically reallocate dispatch cache

We do not maintain event caches so we must make sure that every event
source gets dispatched. If we call epoll_wait() and our buffer gets
filled everytime, then there might be an event source that does not get
dispatched because it is always above the buffer range. Therefore, we now
dynamically increase the cache size when it once gets filled up.

This gets critical if we handle thousands of clients or fds, however, our
use case is limited to some system resources and hence does not suffer
here.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/eloop.c