Standardize mem_malloc_init() implementation