memset() is usually a compiler intrisic and as such is usually optimized (e.g. using SIMD) yielding better performance than per-byte initialization
Since allocate_words was exactly the same code than allocate_bytes (but just adding a multiplicative factor to account for the size difference), I merged both functions.