mirror of
https://github.com/wassname/ray.git
synced 2026-08-09 12:20:09 +08:00
Call vec.data() instead of &vec[0] (#219)
This commit is contained in:
+1
-1
@@ -135,7 +135,7 @@ void Worker::put_object(ObjRef objref, const Obj* obj, std::vector<ObjRef> &cont
|
||||
ObjHandle result;
|
||||
RAY_CHECK(receive_obj_queue_.receive(&result), "error receiving over IPC");
|
||||
uint8_t* target = segmentpool_->get_address(result);
|
||||
std::memcpy(target, &data[0], data.size());
|
||||
std::memcpy(target, data.data(), data.size());
|
||||
// We immediately unmap here; if the object is going to be accessed again, it will be mapped again;
|
||||
// This is reqired because we do not have a mechanism to unmap the object later.
|
||||
segmentpool_->unmap_segment(result.segmentid());
|
||||
|
||||
Reference in New Issue
Block a user