@ -1,6 +1,7 @@
Revision history for libev, a high-performance and full-featured event loop.
- removed redundant 0-ptr check in ev_once.
- updated/extended ev_set_allocator documentation.
4.25 Fri Dec 21 07:49:20 CET 2018
- INCOMPATIBLE CHANGE: EV_THROW was renamed to EV_NOEXCEPT
@ -267,12 +267,32 @@ You could override this function in high-availability programs to, say,
free some memory if it cannot allocate memory, to use a special allocator,
or even to sleep a while and retry until some memory is available.
Example: The following is the C<realloc> function that libev itself uses
which should work with C<realloc> and C<free> functions of all kinds and
is probably a good basis for your own implementation.
static void *
ev_realloc_emul (void *ptr, long size) EV_NOEXCEPT
return realloc (ptr, size);
Example: Replace the libev allocator with one that waits a bit and then
retries (example requires a standards-compliant C<realloc>).
persistent_realloc (void *ptr, size_t size)
void *newptr = realloc (ptr, size);