The cost of loading an unneeded module

If, to keep my scripts simple, I load a module that I might not use, and I end up not using it until I reboot the machine later, what has the unnecessary module loading cost me? I'm thinking of the linux module, but I don't that that's relevant.
 
I'm no authority but I suspect the answer to this is very little. If it's not doing anything, it's not going to be using any cpu/disk/etc resources. Pretty much I think it will just be the memory used by the module, which will likely be next to nothing. As mentioned kldstat will show the size of the module. Man page doesn't seem to specify what units the size are but I'd hazard a guess at bytes in hex. On my system even the entire generic kernel shows a whopping 23MB, which seems about right when compared to the kernel file itself - /boot/kernel/kernel.
 
Man page doesn't seem to specify what units the size are but I'd hazard a guess at bytes in hex.
Seeing as the size for the linux module is listed as 43c7c, that has to be hex. And it's probably in bytes; translated to decimal, it's 277628, and the size of linux.ko is 692872. (All this is for 10.2-RELEASE).
 
Back
Top