update mem_uplimit in memory