What is the adventage of macros against function
navee83 at gmail.com
Wed Apr 27 04:57:47 EDT 2011
Actually you will see lot of macros defined to achieve small and modular
this makes your code faster to execute but the binary size will be bigger.
You will see this in kernel code more because we have very low stack area
sometime may be one page(4096 bytes) of memory.
automatic variable declare and defined in function will occupy space in
In application side C expert suggest to have functions because we have very
big stack area and function adds readability
with easy debugging.
I hope this will help you in your kernel context.
2011/4/27 İsmail Baydan <ibaydan at gmail.com>
> Currently I am trying to learn linux kernel while looking around I saw that
> a lot of function likes macros are defined.What is the adventage of macros
> over functions.
> İsmail Baydan
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies