X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/0f411518435b7edf24d4bddcc86e5958f7e3d23f..692ca25945e1a987acf66bd845ce70a61aa7b160:/ev.h diff --git a/ev.h b/ev.h index 1933285..83cda6f 100644 --- a/ev.h +++ b/ev.h @@ -229,6 +229,20 @@ int ev_version_minor (void); ev_tstamp ev_time (void); +/* Sets the allocation function to use, works like realloc. + * It is used to allocate and free memory. + * If it returns zero when memory needs to be allocated, the library might abort + * or take some potentially destructive action. + * The default is your system realloc function. + */ +void ev_set_allocator (void *(*cb)(void *ptr, long size)); + +/* set the callback function to call on a + * retryable syscall error + * (such as failed select, poll, epoll_wait) + */ +void ev_set_syserr_cb (void (*cb)(const char *msg)); + # if EV_MULTIPLICITY /* the default loop is the only one that handles signals and child watchers */ /* you can call this as often as you like */