Cc: Robert P. J. Day <rpjday@...>, Denys Vlasenko <vda.linux@...>, <linux-mtd@...>, David Woodhouse <dwmw2@...>, Linux Kernel Mailing List <linux-kernel@...>
I think the original reasoning behind kcalloc() was that it did some
extra input checking, so that if the product of the two numbers
overflowed, it would fail with NULL instead of allocating
insufficient space. In the kernel it doesn't matter in practice
since you MUST have additional checking on the size of allocated
memory anyways, not even considering the fact that >PAGE_SIZE
allocations are probably going to fail with decent frequency regardless.
Cheers,
Kyle Moffett
-