change mem_alloc