diff options
-rw-r--r-- | ev.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -768,6 +768,7 @@ fd_rearm_all (EV_P) * the difference is about 5% with 50000+ watchers. */ #define USE_4HEAP !EV_MINIMAL +#define USE_4HEAP 1/* they do not work corretcly */ #if USE_4HEAP #define DHEAP 4 @@ -783,7 +784,7 @@ upheap (WT *heap, int k) { int p = ((k - HEAP0 - 1) / DHEAP) + HEAP0; - if (p >= HEAP0 || heap [p]->at <= w->at) + if (p == k || heap [p]->at <= w->at) break; heap [k] = heap [p]; |