cetra3 commented on code in PR #10317:
URL: https://github.com/apache/arrow-rs/pull/10317#discussion_r3584467438
##########
arrow-buffer/src/buffer/mutable.rs:
##########
@@ -140,13 +174,13 @@ impl MutableBuffer {
NonNull::new(raw_ptr).unwrap_or_else(||
handle_alloc_error(layout))
Review Comment:
My interest in this PR is to help with:
https://github.com/apache/datafusion/issues/22758
The linux allocator famously does not limit allocations, and so you can get
reaped by the OOM killer easily.
If we have a global allocator that internally limits how many allocations it
dishes out, we can course correct in code if an error is returned. A panic
still works, but this is a panic which is a pretty blunt instrument and means
we can't take corrective action in code easily, which is what I found in
testing.
I.e, if we have a memory limited allocator we can use this as a gauge to
whether we need to spill memory to disk etc... so it's very useful as a tool
there
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]