Use uint32_t for xalloc