Re: RFC: turn kmalloc+memset(,0,) into kcalloc

From: Kyle Moffett
Date: Thu Apr 07 2005 - 18:56:05 EST


On Apr 06, 2005, at 11:50, Paulo Marques wrote:
kzalloc it is, then.

[...]

So we gain 8kB on the uncompressed image and 1347 bytes on the compressed one. This was just a dumb test and actual results might be better due to smarter human cleanups.

Not a spectacular gain per se, but the increase in code readability is still worth it, IMHO.

Perhaps this could eventually be modified to draw from a prezeroed block of
memory, similar to the current code for doing the same thing for userspace.
It probably wouldn't give much performance gain, especially since it's not
used for large blocks or large numbers of small objects (As you would use a
slabcache for those), but it might help a bit. Of course, the code would
need to fall back quickly if such an allocation would be messy or expensive
for any reason.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
------END GEEK CODE BLOCK------


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" 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.tux.org/lkml/