You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2023/08/23 03:44:08 UTC
[GitHub] [arrow] wgtmac commented on issue #37212: [C++] BufferReader should zero-copy if and only if given a Buffer, not a pointer and length
wgtmac commented on issue #37212:
URL: https://github.com/apache/arrow/issues/37212#issuecomment-1689235443
The ctor of Buffer has a comment implies that `the passed memory must be kept alive through some other means`.
```
/// \brief Construct from buffer and size without copying memory
///
/// \param[in] data a memory buffer
/// \param[in] size buffer size
///
/// \note The passed memory must be kept alive through some other means
Buffer(const uint8_t* data, int64_t size)
```
Does it mean `BufferReader` should inherit the same implication? The buffer itself cannot tell if it is owned or not after construction. If we have that info on hand, could we handle zero-copy better?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org