OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
arrow Namespace Reference


key_t get_and_copy_to_shm (const std::shared_ptr< Buffer > &data)

Function Documentation

key_t arrow::get_and_copy_to_shm ( const std::shared_ptr< Buffer > &  data)

Definition at line 181 of file ArrowResultSetConverter.cpp.

References anonymous_namespace{ArrowResultSetConverter.cpp}::get_shm().

Referenced by ArrowResultSetConverter::getArrowResult().

181  {
182  auto [key, ipc_ptr] = get_shm(data->size());
183  // copy the arrow records buffer to shared memory
184  // TODO(ptaylor): I'm sure it's possible to tell Arrow's RecordBatchStreamWriter to
185  // write directly to the shared memory segment as a sink
186  memcpy(ipc_ptr, data->data(), data->size());
187  // detach from the shared memory segment
188  shmdt(ipc_ptr);
189  return key;
190 }
std::pair< key_t, void * > get_shm(size_t shmsz)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: