Re: Reg : module init and exit function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manish Katiyar wrote:
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 ???

Yes, I guess to be freed up we use __init macro. Can it do this by default, I am not sure.

Thanks -
Manish



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux