Small fixes, including a memset(NULL, c, n)

Here are some tiny fixes to C files. One of them prevents a call to `memset` with a `NULL` first argument when an allocation fails, and it makes the allocator cache more readable. (It also enlarges the cache a little bit, which is out of laziness rather than optimization concerns.)