Hi all!

On 15/10/18 14:17, Lev Olshvang wrote:
[...]
> I am debugging kernel module and use  SystemTap to monitor requested and 
> freed memory.
> 
> I see that SystemTap statistics shows that kfree() is called 5 times more 
> than kalloc. 
> It happens not only on my module, it happens on VirtualBox vboxsf driver as 
> well.
> 
> See hits count below  kmalloc hits: 21561
>                                   kfree      hits: 102175

"kfree(NULL)" is a legal NO-OP (and basically all other similar
functions are expected to gracefully accept a NULL pointer).

MfG,
        Bernd
-- 
"I dislike type abstraction if it has no real reason. And saving
on typing is not a good reason - if your typing speed is the main
issue when you're coding, you're doing something seriously wrong."
    - Linus Torvalds

Attachment: pEpkey.asc
Description: application/pgp-keys

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to