fill in empty memory if needed