memory alloc/free issue
bycn82 at gmail.com
Tue Dec 9 17:33:44 PST 2014
*thanks for replying, *
*I noticed that it was because module A released the memory which allocated
in module B. thought they are using the same m_type in kmalloc/kfree.*
*below are the message,*
*Dec 9 19:05:21 dfly kernel: ipfw2 module basic unloaded malloc_uninit: 96
bytes of 'IPFW2_BASIC' still allocated on cpu 4 ---------this line is
printed when ipfw_basic modules was unloaded, 96 bytes still on the system*
*Dec 9 19:05:21 dfly kernel: IP firewall unloaded malloc_uninit: -96 bytes
of 'IPFW2_BASIC' still allocated on cpu 4 ----and this line is printed
when ipfw modules was unloaded, now it is -96 bytes*
*I am going to move the code from ipfw module to ipfw_basic module, so the
96 bytes are going to allocate/free within the same module.*
On Wed, Dec 10, 2014 at 4:45 AM, Matthew Dillon <dillon at apollo.backplane.com
> Memory must be allocated and freed from the same pool. It is not
> legal to allocate memory from one pool and free it to another.
> These memory pools are struct malloc_type and typically denoted with
> M_SOMENAME in device and network drivers.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernel