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.60 by root, Wed Nov 28 18:29:30 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
1222not exist" is a status change like any other. The condition "path does 1223not exist" is a status change like any other. The condition "path does
1223not exist" is signified by the C<st_nlink> field being zero (which is 1224not exist" is signified by the C<st_nlink> field being zero (which is
1224otherwise always forced to be at least one) and all the other fields of 1225otherwise always forced to be at least one) and all the other fields of
1225the stat buffer having unspecified contents. 1226the stat buffer having unspecified contents.
1226 1227
1228The path I<should> be absolute and I<must not> end in a slash. If it is
1229relative and your working directory changes, the behaviour is undefined.
1230
1227Since there is no standard to do this, the portable implementation simply 1231Since there is no standard to do this, the portable implementation simply
1228calls C<stat (2)> regularly on the path to see if it changed somehow. You 1232calls C<stat (2)> regularly on the path to see if it changed somehow. You
1229can specify a recommended polling interval for this case. If you specify 1233can specify a recommended polling interval for this case. If you specify
1230a polling interval of C<0> (highly recommended!) then a I<suitable, 1234a polling interval of C<0> (highly recommended!) then a I<suitable,
1231unspecified default> value will be used (which you can expect to be around 1235unspecified default> value will be used (which you can expect to be around

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines