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

Comparing libev/ev.pod (file contents):
Revision 1.282 by root, Wed Mar 10 08:19:39 2010 UTC vs.
Revision 1.283 by root, Wed Mar 10 09:18:25 2010 UTC

3838fine. 3838fine.
3839 3839
3840If your embedding application does not need any priorities, defining these 3840If your embedding application does not need any priorities, defining these
3841both to C<0> will save some memory and CPU. 3841both to C<0> will save some memory and CPU.
3842 3842
3843=item EV_PERIODIC_ENABLE 3843=item EV_PERIODIC_ENABLE, EV_IDLE_ENABLE, EV_EMBED_ENABLE, EV_STAT_ENABLE,
3844EV_PREPARE_ENABLE, EV_CHECK_ENABLE, EV_FORK_ENABLE, EV_SIGNAL_ENABLE,
3845EV_ASYNC_ENABLE, EV_CHILD_ENABLE.
3844 3846
3845If undefined or defined to be C<1>, then periodic timers are supported. If 3847If undefined or defined to be C<1> (and the platform supports it), then
3846defined to be C<0>, then they are not. Disabling them saves a few kB of 3848the respective watcher type is supported. If defined to be C<0>, then it
3847code. 3849is not. Disabling watcher types mainly saves codesize.
3848
3849=item EV_IDLE_ENABLE
3850
3851If undefined or defined to be C<1>, then idle watchers are supported. If
3852defined to be C<0>, then they are not. Disabling them saves a few kB of
3853code.
3854
3855=item EV_EMBED_ENABLE
3856
3857If undefined or defined to be C<1>, then embed watchers are supported. If
3858defined to be C<0>, then they are not. Embed watchers rely on most other
3859watcher types, which therefore must not be disabled.
3860
3861=item EV_STAT_ENABLE
3862
3863If undefined or defined to be C<1>, then stat watchers are supported. If
3864defined to be C<0>, then they are not.
3865
3866=item EV_FORK_ENABLE
3867
3868If undefined or defined to be C<1>, then fork watchers are supported. If
3869defined to be C<0>, then they are not.
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
3876=item EV_ASYNC_ENABLE
3877
3878If undefined or defined to be C<1>, then async watchers are supported. If
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.
3885 3850
3886=item EV_MINIMAL 3851=item EV_MINIMAL
3887 3852
3888If you need to shave off some kilobytes of code at the expense of some 3853If you need to shave off some kilobytes of code at the expense of some
3889speed (but with the full API), define this symbol to C<1>. Currently this 3854speed (but with the full API), define this symbol to C<1>. Currently this
3900Defining C<EV_MINIMAL> to C<2> will additionally reduce the core API to 3865Defining C<EV_MINIMAL> to C<2> will additionally reduce the core API to
3901provide a bare-bones event library. See C<ev.h> for details on what parts 3866provide a bare-bones event library. See C<ev.h> for details on what parts
3902of the API are still available, and do not complain if this subset changes 3867of the API are still available, and do not complain if this subset changes
3903over time. 3868over time.
3904 3869
3905This example set of settings reduces the compiled size of libev from 24Kb 3870This example set of settings reduces the compiled size of libev from
3906to 8Kb on my GNU/Linux amd64 system (and leaves little in - there is also 387123.9Kb to 7.7Kb on my GNU/Linux amd64 system (and leaves little
3907an effect on the amount of memory used). With an intelligent-enough linker 3872in - there is also an effect on the amount of memory used). With
3908further unused functions might be left out as well automatically. 3873an intelligent-enough linker (gcc+binutils do this when you use
3874C<-Wl,--gc-sections -ffunction-sections>) further unused functions might
3875be left out as well automatically - a binary starting a timer and an I/O
3876watcher then might come out at only 5Kb.
3909 3877
3910 // tuning and API changes 3878 // tuning and API changes
3911 #define EV_MINIMAL 2 3879 #define EV_MINIMAL 2
3912 #define EV_MULTIPLICITY 0 3880 #define EV_MULTIPLICITY 0
3913 #define EV_MINPRI 0 3881 #define EV_MINPRI 0
3929 3897
3930 // disable all watcher types that cna be disabled 3898 // disable all watcher types that cna be disabled
3931 #define EV_STAT_ENABLE 0 3899 #define EV_STAT_ENABLE 0
3932 #define EV_PERIODIC_ENABLE 0 3900 #define EV_PERIODIC_ENABLE 0
3933 #define EV_IDLE_ENABLE 0 3901 #define EV_IDLE_ENABLE 0
3902 #define EV_CHECK_ENABLE 0
3903 #define EV_PREPARE_ENABLE 0
3934 #define EV_FORK_ENABLE 0 3904 #define EV_FORK_ENABLE 0
3935 #define EV_SIGNAL_ENABLE 0 3905 #define EV_SIGNAL_ENABLE 0
3936 #define EV_CHILD_ENABLE 0 3906 #define EV_CHILD_ENABLE 0
3937 #define EV_ASYNC_ENABLE 0 3907 #define EV_ASYNC_ENABLE 0
3938 #define EV_EMBED_ENABLE 0 3908 #define EV_EMBED_ENABLE 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines