allocate write_req on the heap