Skip to content

Conversation

@laurentgo
Copy link
Contributor

Buffer allocator headroom is the minimum between the parent headroom
and the memory available for the current allocator. But if the allocator
also has some reserved memory (which has been accounted for in the parent
allocator), the headroom is actually less than what is currently available.

For example if parent allocator limit is 10, and child allocator has 2 of
reserved memory, assuming that no other memory has been allocated, headroom
for the child allocator is 10, not 8.

Fix Accountant#getHeadroom to take into account reserved memory into its
calculation.

Buffer allocator headroom is the minimum between the parent headroom
and the memory available for the current allocator. But if the allocator
also has some reserved memory (which has been accounted for in the parent
allocator), the headroom is actually less than what is currently available.

For example if parent allocator limit is 10, and child allocator has 2 of
reserved memory, assuming that no other memory has been allocated, headroom
for the child allocator is 10, not 8.

Fix Accountant#getHeadroom to take into account reserved memory into its
calculation.
Copy link
Contributor

@siddharthteotia siddharthteotia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@siddharthteotia siddharthteotia merged commit fbba3be into apache:master Sep 7, 2018
siddharthteotia pushed a commit to siddharthteotia/arrow that referenced this pull request Sep 7, 2018
Buffer allocator headroom is the minimum between the parent headroom
and the memory available for the current allocator. But if the allocator
also has some reserved memory (which has been accounted for in the parent
allocator), the headroom is actually less than what is currently available.

For example if parent allocator limit is 10, and child allocator has 2 of
reserved memory, assuming that no other memory has been allocated, headroom
for the child allocator is 10, not 8.

Fix Accountant#getHeadroom to take into account reserved memory into its
calculation.
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
Buffer allocator headroom is the minimum between the parent headroom
and the memory available for the current allocator. But if the allocator
also has some reserved memory (which has been accounted for in the parent
allocator), the headroom is actually less than what is currently available.

For example if parent allocator limit is 10, and child allocator has 2 of
reserved memory, assuming that no other memory has been allocated, headroom
for the child allocator is 10, not 8.

Fix Accountant#getHeadroom to take into account reserved memory into its
calculation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants