alamb commented on code in PR #7041:
URL: https://github.com/apache/arrow-datafusion/pull/7041#discussion_r1269722728
##########
datafusion/execution/src/memory_pool/proxy.rs:
##########
@@ -84,7 +84,7 @@ impl<T> RawTableAllocExt for RawTable<T> {
Err(x) => {
// need to request more memory
- let bump_elements = (self.capacity() * 2).max(16);
+ let bump_elements = self.capacity().max(16);
let bump_size = bump_elements * std::mem::size_of::<T>();
*accounting =
(*accounting).checked_add(bump_size).expect("overflow");
Review Comment:
I double checked that the call to `reserve` below ensures *additional*
capacity, not *total* capacity which is what the existing code appears to do.
https://docs.rs/hashbrown/latest/hashbrown/raw/struct.RawTable.html#method.reserve
cc @crepererum and @Dandandan
--
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]