Josh Rosenberg added the comment:

Overallocating by 50% might be overkill here; I wouldn't imagine most users of 
epoll.poll would use anything but:

1. Limit to 1 event
2. Limit to some constant K events
3. Use default maxevents (FD_SETSIZE - 1)

Even if called in pathological order, that would only involve three progressive 
reallocations before steady state; potentially avoiding one of them (if K and 
FD_SETSIZE - 1 are within the 50% overallocation) in a relatively uncommon case 
doesn't seem like it's worth the guaranteed waste in the common case.

----------
nosy: +josh.r
title: select.epoll.wait() should away calling malloc() each time -> 
select.epoll.poll() should away calling malloc() each time

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26233>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to