hi all<br><br>        in the kernel modules,we often use the macro __init.<br>if we only discuss the __init for functions.__init tells the <br>compiler to put  the function in a special section.and the <br>function are used once.So the code of this function should<br>
be freed from the memory after the first call.<br><br>so i write a sample module:<br><br>#include &lt;linux/module.h&gt;<br>#include &lt;linux/init.h&gt;<br><br>void __init print_k(void)<br>{<br>    int k = 9;<br>    printk(&quot;&lt;0&gt;k = %d\n&quot;,k);<br>
}<br><br>static int __init hello_init(void)<br>{<br>    printk(&quot;&lt;0&gt;hello kernel!\n&quot;);<br>    print_k();<br>    print_k();<br>    return 0;<br>}<br><br>static void __exit hello_exit(void)<br>{<br>    printk(&quot;&lt;0&gt;bye kernel!\n&quot;);<br>
}<br><br>module_init(hello_init);<br>module_exit(hello_exit);<br>MODULE_LICENSE(&quot;GPL&quot;);<br><br>i use the __init for function print_k.<br>in my opinion  after the fisrt invoking the print_k in the hello_init.<br>
the memory of print_k will be freed,and the second invoking will<br>not be executed.but the result of second invoking is executing .<br><br>why?<br><br>Thanks in advance!<br>wanny<br>