Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not extend the pool on each allocation #55

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Jun 22, 2023

Reported in Boost mailing list: https://lists.boost.org/Archives/boost/2023/06/254750.php

Commit 951ca57 changed malloc_need_resize() to use set_next_size(), which sets start_size in addition to setting next_size. this causes repeated use of purge_memory() to allocate 2x size after every use.

Fixes #54

@orgads orgads force-pushed the no-extend branch 4 times, most recently from 10969c8 to e231843 Compare June 24, 2023 19:18
@codecov
Copy link

codecov bot commented Jun 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.69%. Comparing base (8ec1be1) to head (82b22e3).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #55      +/-   ##
===========================================
- Coverage    93.71%   93.69%   -0.03%     
===========================================
  Files            9        9              
  Lines          589      587       -2     
===========================================
- Hits           552      550       -2     
  Misses          37       37              
Files with missing lines Coverage Δ
include/boost/pool/pool.hpp 96.58% <100.00%> (-0.03%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ec1be1...82b22e3. Read the comment docs.

Copy link
Collaborator

@jeking3 jeking3 left a comment

Choose a reason for hiding this comment

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

Rebase on current develop for a full CI suite run.

include/boost/pool/pool.hpp Show resolved Hide resolved
Reported in Boost mailing list:
https://lists.boost.org/Archives/boost/2023/06/254750.php

Commit 951ca57 changed malloc_need_resize() to use set_next_size(),
which sets start_size in addition to setting next_size. this causes
repeated use of purge_memory() to allocate 2x size after every use.

Fixes boostorg#54
@orgads
Copy link
Contributor Author

orgads commented Jan 4, 2025

Rebased.

@orgads
Copy link
Contributor Author

orgads commented Jan 4, 2025

The failure is due to quota limit on codecov, unrelated to my change.

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.

[REGRESSION] Pool size is extended on each allocation
2 participants