use xmalloc_unsafe in refill_memory_reserve