Le 09/11/2014 14:00, Maxime Villard a écrit :
After all, kmem_intr_zalloc is not needed since the caller can simply do
ptr = kmem_intr_alloc(...);
memset(ptr, 0, ...);
That's because kmem_intr_zalloc() is naive. It could also allocate a
page from pools where the page has been previously zero'd by UVM
(through UVM_PGA_ZERO) or else fallback to memset().
kmem_intr_alloc() does not set any constraint on that. You may have
garbage inside, it is just that caller does not care.
Still, they both exist - rightfully or wrongfully - while their usage is
limited.
That depends on caller's wishes.
--
Jean-Yves Migeon