Question about devm_kzalloc() and friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Can some one tell me if that memory allocated by these functions is
freed when the last reference (pointer) to the MEMORY goes out of
scope, or when the last reference to the DEVICE is put?

For instance:

probe()
{
    ptr = devm_kzalloc(dev, ....)
    ptr = devm_kzalloc(dev,.....)
}

The reference to the first memory goes away as soon as I make the
second call, but the device stays around. So when is the first memory
freed? At the second call or at the device removal time?

Thanks,

Rajat
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs



[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux