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

Comparing libev/ev.pod (file contents):
Revision 1.281 by root, Tue Mar 9 08:46:17 2010 UTC vs.
Revision 1.282 by root, Wed Mar 10 08:19:39 2010 UTC

3866=item EV_FORK_ENABLE 3866=item EV_FORK_ENABLE
3867 3867
3868If undefined or defined to be C<1>, then fork watchers are supported. If 3868If undefined or defined to be C<1>, then fork watchers are supported. If
3869defined to be C<0>, then they are not. 3869defined to be C<0>, then they are not.
3870 3870
3871=item EV_SIGNAL_ENABLE
3872
3873If undefined or defined to be C<1>, then signal watchers are supported. If
3874defined to be C<0>, then they are not.
3875
3871=item EV_ASYNC_ENABLE 3876=item EV_ASYNC_ENABLE
3872 3877
3873If undefined or defined to be C<1>, then async watchers are supported. If 3878If undefined or defined to be C<1>, then async watchers are supported. If
3874defined to be C<0>, then they are not. 3879defined to be C<0>, then they are not.
3880
3881=item EV_CHILD_ENABLE
3882
3883If undefined or defined to be C<1> (and C<_WIN32> is not defined), then
3884child watchers are supported. If defined to be C<0>, then they are not.
3875 3885
3876=item EV_MINIMAL 3886=item EV_MINIMAL
3877 3887
3878If you need to shave off some kilobytes of code at the expense of some 3888If you need to shave off some kilobytes of code at the expense of some
3879speed (but with the full API), define this symbol to C<1>. Currently this 3889speed (but with the full API), define this symbol to C<1>. Currently this
3881on amd64. It also selects a much smaller 2-heap for timer management over 3891on amd64. It also selects a much smaller 2-heap for timer management over
3882the default 4-heap. 3892the default 4-heap.
3883 3893
3884You can save even more by disabling watcher types you do not need 3894You can save even more by disabling watcher types you do not need
3885and setting C<EV_MAXPRI> == C<EV_MINPRI>. Also, disabling C<assert> 3895and setting C<EV_MAXPRI> == C<EV_MINPRI>. Also, disabling C<assert>
3886(C<-DNDEBUG>) will usually reduce code size a lot. 3896(C<-DNDEBUG>) will usually reduce code size a lot. Disabling inotify,
3897eventfd and signalfd will further help, and disabling backends one doesn't
3898need (e.g. poll, epoll, kqueue, ports) will help further.
3887 3899
3888Defining C<EV_MINIMAL> to C<2> will additionally reduce the core API to 3900Defining C<EV_MINIMAL> to C<2> will additionally reduce the core API to
3889provide a bare-bones event library. See C<ev.h> for details on what parts 3901provide a bare-bones event library. See C<ev.h> for details on what parts
3890of the API are still available, and do not complain if this subset changes 3902of the API are still available, and do not complain if this subset changes
3891over time. 3903over time.
3904
3905This example set of settings reduces the compiled size of libev from 24Kb
3906to 8Kb on my GNU/Linux amd64 system (and leaves little in - there is also
3907an effect on the amount of memory used). With an intelligent-enough linker
3908further unused functions might be left out as well automatically.
3909
3910 // tuning and API changes
3911 #define EV_MINIMAL 2
3912 #define EV_MULTIPLICITY 0
3913 #define EV_MINPRI 0
3914 #define EV_MAXPRI 0
3915
3916 // OS-specific backends
3917 #define EV_USE_INOTIFY 0
3918 #define EV_USE_EVENTFD 0
3919 #define EV_USE_SIGNALFD 0
3920 #define EV_USE_REALTIME 0
3921 #define EV_USE_MONOTONIC 0
3922 #define EV_USE_CLOCK_SYSCALL 0
3923
3924 // disable all backends except select
3925 #define EV_USE_POLL 0
3926 #define EV_USE_PORT 0
3927 #define EV_USE_KQUEUE 0
3928 #define EV_USE_EPOLL 0
3929
3930 // disable all watcher types that cna be disabled
3931 #define EV_STAT_ENABLE 0
3932 #define EV_PERIODIC_ENABLE 0
3933 #define EV_IDLE_ENABLE 0
3934 #define EV_FORK_ENABLE 0
3935 #define EV_SIGNAL_ENABLE 0
3936 #define EV_CHILD_ENABLE 0
3937 #define EV_ASYNC_ENABLE 0
3938 #define EV_EMBED_ENABLE 0
3892 3939
3893=item EV_AVOID_STDIO 3940=item EV_AVOID_STDIO
3894 3941
3895If this is set to C<1> at compiletime, then libev will avoid using stdio 3942If this is set to C<1> at compiletime, then libev will avoid using stdio
3896functions (printf, scanf, perror etc.). This will increase the codesize 3943functions (printf, scanf, perror etc.). This will increase the codesize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines