Re: initfunc

Bradley D. LaRonde (brad@ltc.com)
Wed, 11 Aug 1999 22:10:48 -0400


From: wu_yb <wu_yb@263.net>
> A newbie question.
> In kernel 2.2.x, many functions are declared as __initfunc(),
> such as __initfunc(void setup_arch(xxx)), does __initfunc()
> means that after this function called, the mem occupied can
> be freed ?
>
> Thanks !!!

Yup.

It puts those functions into the .text.init section. The linker then puts
that section (and .data.init) between the nicely aligned symbols
__init_begin and __init_end. Then free_initmem() frees up all of those
pages, which is called from init() before execve'ing /sbin/init.

Regards,
Brad

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/