Hongze Zhang created ARROW-11143:
------------------------------------
Summary: [C++] Support status return for method MemoryPool::Free
Key: ARROW-11143
URL: https://issues.apache.org/jira/browse/ARROW-11143
Project: Apache Arrow
Issue Type: Improvement
Components: C++
Reporter: Hongze Zhang
Currently MemoryPool::Free has void return:
https://github.com/apache/arrow/blob/e05f032c1e5d590ac56372d13ec637bd28b47a96/cpp/src/arrow/memory_pool.h#L88.
This is not enough for some complicated scenarios like in ARROW-7808, we bring
some possible JNI calls in the method within class
ReservationListenableMemoryPool:
https://github.com/apache/arrow/pull/7030/files#diff-ad18b6c937b5960c70ef6825654a98de6ee33ae72127a4af4895afe944966144R582-R604.
We can discuss more on this before actually solving this issue in case we think
of `Free` is always a error-free behavior comparing to `Allocate`. Anyway if
the logic of cod e grows there will always be complicated codes that can throw
errors to be brought. Anyway we can expect some more comments to this topic
from dev.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)