On Tue, Nov 4, 2008 at 9:48 AM, Santosh <ssantosh@xxxxxxxxxx> wrote: > Mohamed Thalib .H wrote: >> >> Hi all, >> >> I have a doubt >> >> Whether the code that is inside the moudles init and exit function >> will >> be executed if the module is not compiled as module and it is compiled >> into the kernel image itself. >> >> > > The module's init fucntion will be run even if it is compiled > statically into the kernel image. The exit function won't be run since it > can't be unloaded from the memory. > > In case where the kernel is configured not to unload modules the exit > function will never be run since the module never unloads. Once the init > function is executed the function itself is discarded since it won't be > needed later. Correct........and that is the memory you see when you see your bootup messages. Something like "Freed 128K of memory ....." But I think for that you have to declare with __init or can it take this decision by default ??? Thanks - Manish > > Please correct me if I am wrong. > > Thanks > Santosh > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ