ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.58 by root, Wed Nov 28 11:31:34 2007 UTC vs.
Revision 1.59 by root, Wed Nov 28 17:32:24 2007 UTC

163C<ev_embeddable_backends () & ev_supported_backends ()>, likewise for 163C<ev_embeddable_backends () & ev_supported_backends ()>, likewise for
164recommended ones. 164recommended ones.
165 165
166See the description of C<ev_embed> watchers for more info. 166See the description of C<ev_embed> watchers for more info.
167 167
168=item ev_set_allocator (void *(*cb)(void *ptr, size_t size)) 168=item ev_set_allocator (void *(*cb)(void *ptr, long size))
169 169
170Sets the allocation function to use (the prototype and semantics are 170Sets the allocation function to use (the prototype is similar - the
171identical to the realloc C function). It is used to allocate and free 171semantics is identical - to the realloc C function). It is used to
172memory (no surprises here). If it returns zero when memory needs to be 172allocate and free memory (no surprises here). If it returns zero when
173allocated, the library might abort or take some potentially destructive 173memory needs to be allocated, the library might abort or take some
174action. The default is your system realloc function. 174potentially destructive action. The default is your system realloc
175function.
175 176
176You could override this function in high-availability programs to, say, 177You could override this function in high-availability programs to, say,
177free some memory if it cannot allocate memory, to use a special allocator, 178free some memory if it cannot allocate memory, to use a special allocator,
178or even to sleep a while and retry until some memory is available. 179or even to sleep a while and retry until some memory is available.
179 180

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines