How to get rid of unused data in LKM
Wolfgang Denk
wd at denx.de
Thu Jul 25 01:49:09 EST 2002
In message <3D3E91E6.4000500 at esd-electronics.com> you wrote:
>
> I am writing a LKM that contains a huge constant array of data that is used
> as firmware for a PCI card that is connected to the system where the LKM is loaded.
>
> The module_init function writes the constant data array into the PCI card's RAM and triggers
> a CPU on that card to jump to the firmware code. This works fine.
Why don't you load the firmware using some ioctl() _after_ loading
the module?
> But after doing so, the firmware data is still wasting kernel memory on the host system
> and is not used anymore.
> How can I free that memory ? Is there a better way to handle that data ?
If you really think you must link the data with the module: Declare
it using "__initdata" ?
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
This is an unauthorized cybernetic announcement.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list