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

Comparing libev/ev.3 (file contents):
Revision 1.31 by root, Wed Nov 28 11:31:34 2007 UTC vs.
Revision 1.33 by root, Wed Nov 28 18:29:29 2007 UTC

305might be supported on the current system, you would need to look at 305might be supported on the current system, you would need to look at
306\&\f(CW\*(C`ev_embeddable_backends () & ev_supported_backends ()\*(C'\fR, likewise for 306\&\f(CW\*(C`ev_embeddable_backends () & ev_supported_backends ()\*(C'\fR, likewise for
307recommended ones. 307recommended ones.
308.Sp 308.Sp
309See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info. 309See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info.
310.IP "ev_set_allocator (void *(*cb)(void *ptr, size_t size))" 4 310.IP "ev_set_allocator (void *(*cb)(void *ptr, long size))" 4
311.IX Item "ev_set_allocator (void *(*cb)(void *ptr, size_t size))" 311.IX Item "ev_set_allocator (void *(*cb)(void *ptr, long size))"
312Sets the allocation function to use (the prototype and semantics are 312Sets the allocation function to use (the prototype is similar \- the
313identical to the realloc C function). It is used to allocate and free 313semantics is identical \- to the realloc C function). It is used to
314memory (no surprises here). If it returns zero when memory needs to be 314allocate and free memory (no surprises here). If it returns zero when
315allocated, the library might abort or take some potentially destructive 315memory needs to be allocated, the library might abort or take some
316action. The default is your system realloc function. 316potentially destructive action. The default is your system realloc
317function.
317.Sp 318.Sp
318You could override this function in high-availability programs to, say, 319You could override this function in high-availability programs to, say,
319free some memory if it cannot allocate memory, to use a special allocator, 320free some memory if it cannot allocate memory, to use a special allocator,
320or even to sleep a while and retry until some memory is available. 321or even to sleep a while and retry until some memory is available.
321.Sp 322.Sp
1382The path does not need to exist: changing from \*(L"path exists\*(R" to \*(L"path does 1383The path does not need to exist: changing from \*(L"path exists\*(R" to \*(L"path does
1383not exist\*(R" is a status change like any other. The condition \*(L"path does 1384not exist\*(R" is a status change like any other. The condition \*(L"path does
1384not exist\*(R" is signified by the \f(CW\*(C`st_nlink\*(C'\fR field being zero (which is 1385not exist\*(R" is signified by the \f(CW\*(C`st_nlink\*(C'\fR field being zero (which is
1385otherwise always forced to be at least one) and all the other fields of 1386otherwise always forced to be at least one) and all the other fields of
1386the stat buffer having unspecified contents. 1387the stat buffer having unspecified contents.
1388.PP
1389The path \fIshould\fR be absolute and \fImust not\fR end in a slash. If it is
1390relative and your working directory changes, the behaviour is undefined.
1387.PP 1391.PP
1388Since there is no standard to do this, the portable implementation simply 1392Since there is no standard to do this, the portable implementation simply
1389calls \f(CW\*(C`stat (2)\*(C'\fR regularly on the path to see if it changed somehow. You 1393calls \f(CW\*(C`stat (2)\*(C'\fR regularly on the path to see if it changed somehow. You
1390can specify a recommended polling interval for this case. If you specify 1394can specify a recommended polling interval for this case. If you specify
1391a polling interval of \f(CW0\fR (highly recommended!) then a \fIsuitable, 1395a polling interval of \f(CW0\fR (highly recommended!) then a \fIsuitable,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines