The fs_poll handle could also be embedded in uv__fsevents_poller_item_t instead of using a pointer, then you can use container_of in he callback and avoid malloc / free.