Skip to content

Remove custom doubling allocation strategy in  #9057

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

As I noted on #9025 https://github.com/apache/arrow-datafusion/pull/9025/files#r1468533266

There is a custom allocation pattern in VecAllocExt that doubles the size of the allocation each time
https://github.com/apache/arrow-datafusion/blob/d594e6257b34a5ad47112e26d41516aaeb19e6dd/datafusion/execution/src/memory_pool/proxy.rs#L39-L50

The actual rust stdlib also uses ths approach, but appears to handle overflows better :

https://github.com/rust-lang/rust/blob/fb4bca04fa1bde2f7db1b31a59e066f7bebd7fc6/library/alloc/src/vec/mod.rs#L1918-L1929

https://github.com/rust-lang/rust/blob/fb4bca04fa1bde2f7db1b31a59e066f7bebd7fc6/library/alloc/src/raw_vec.rs#L405-L436

Thus I don't know why we have our own custom doubling implementation

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions