Set next_free and next_read as local