… | |
… | |
520 | } |
520 | } |
521 | } |
521 | } |
522 | |
522 | |
523 | /*****************************************************************************/ |
523 | /*****************************************************************************/ |
524 | |
524 | |
525 | #define MALLOC_ROUND 4096 // prefer to allocate in chunks of this size, must be 2**n and >> 4 longs |
525 | #define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */ |
526 | |
526 | |
527 | int inline_size |
527 | int inline_size |
528 | array_nextsize (int elem, int cur, int cnt) |
528 | array_nextsize (int elem, int cur, int cnt) |
529 | { |
529 | { |
530 | int ncur = cur + 1; |
530 | int ncur = cur + 1; |
… | |
… | |
2116 | if (w->wd < 0) |
2116 | if (w->wd < 0) |
2117 | { |
2117 | { |
2118 | ev_timer_start (EV_A_ &w->timer); /* this is not race-free, so we still need to recheck periodically */ |
2118 | ev_timer_start (EV_A_ &w->timer); /* this is not race-free, so we still need to recheck periodically */ |
2119 | |
2119 | |
2120 | /* monitor some parent directory for speedup hints */ |
2120 | /* monitor some parent directory for speedup hints */ |
|
|
2121 | /* note that exceeding the hardcoded limit is not a correctness issue, */ |
|
|
2122 | /* but an efficiency issue only */ |
2121 | if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) |
2123 | if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) |
2122 | { |
2124 | { |
2123 | char path [4096]; |
2125 | char path [4096]; |
2124 | strcpy (path, w->path); |
2126 | strcpy (path, w->path); |
2125 | |
2127 | |