Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] SwapEndianArrayData should allocate from a configurable pool #35511

Closed
bkietz opened this issue May 9, 2023 · 0 comments · Fixed by #36431
Closed

[C++] SwapEndianArrayData should allocate from a configurable pool #35511

bkietz opened this issue May 9, 2023 · 0 comments · Fixed by #36431

Comments

@bkietz
Copy link
Member

bkietz commented May 9, 2023

Describe the enhancement requested

Currently, SwapEndianArrayData() will always allocate new buffers from the default memory pool. It should instead conform to other allocating functions and accept a MemoryPool* argument:

Result<std::shared_ptr<ArrayData>> SwapEndianArrayData(
    const std::shared_ptr<ArrayData>& data, MemoryPool* = default_memory_pool());

Component(s)

C++

pitrou pushed a commit that referenced this issue Jul 4, 2023
### Rationale for this change

Add memory_pool argument in `SwapEndianArrayData` to avoid allocating all from default memory pool.

### What changes are included in this PR?

Add memory_pool argument in `SwapEndianArrayData` 

### Are these changes tested?

Maybe tested by ipc

### Are there any user-facing changes?

Maybe user would use the new interface

* Closes: #35511

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
@pitrou pitrou added this to the 13.0.0 milestone Jul 4, 2023
westonpace pushed a commit to westonpace/arrow that referenced this issue Jul 7, 2023
…pache#36431)

### Rationale for this change

Add memory_pool argument in `SwapEndianArrayData` to avoid allocating all from default memory pool.

### What changes are included in this PR?

Add memory_pool argument in `SwapEndianArrayData` 

### Are these changes tested?

Maybe tested by ipc

### Are there any user-facing changes?

Maybe user would use the new interface

* Closes: apache#35511

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants