News for hackers. Stuff that matters.
Re:Android Project Changeset 4f8b683: libc/memset.c by scott_s on Wednesday May 26, 2010 @08:17AM (#1380085)
Sometimes you manage your own memory, so you can't use calloc. Sometimes you're zeroing out stack allocated memory, such as the common practice when doing socket programming in C.

Setting memory you own to a known value is just good, defensive programming. If I screw up - and in C, you're going to screw up - it's good to see a known value rather than unknown values.

Re:Android Project Changeset 4f8b683: libc/memset.c by hoelle on Wednesday May 26, 2010 @11:08AM (#1380445)
Removing the memsets from the networking layer of one of my projects basically halved the frametime of that system (which was a bottleneck).

I'm all for defensive programming, but when you need to be fast, you'll just have to make sure it's correct.