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

switch to Talc memory allocator #803

Merged
merged 6 commits into from
Aug 8, 2023
Merged

switch to Talc memory allocator #803

merged 6 commits into from
Aug 8, 2023

Conversation

stlankes
Copy link
Contributor

@stlankes stlankes commented Jul 22, 2023

In contrast to linked_list_allocator I measured a better performance. The difference is large enough to change the crate.

Result with linked_list_allocator as default allocator:

   83430 allocation attempts,   83430 successful allocations,   83430 pre-fail allocations,   58282 deallocations
            CATEGORY | OCTILE 0       1       2       3       4       5       6       7       8 | AVERAGE
---------------------|--------------------------------------------------------------------------|---------
     All Allocations |      186    5500   14872   27390   44238   65712   97346  174924 2786786 |   84098   ticks
Pre-Fail Allocations |      186    5500   14872   27390   44238   65712   97346  174924 2786786 |   84098   ticks
       Deallocations |      180    3584    9824   18124   29224   43996   67114  119002  531484 |   53099   ticks

Result with talc as default allocator:

  571170 allocation attempts,  571170 successful allocations,  571170 pre-fail allocations,  402241 deallocations
            CATEGORY | OCTILE 0       1       2       3       4       5       6       7       8 | AVERAGE
---------------------|--------------------------------------------------------------------------|---------
     All Allocations |      250     364     568     612     668     770     876    157410049592 |   16094   ticks
Pre-Fail Allocations |      250     364     568     612     668     770     876    157410049592 |   16094   ticks
       Deallocations |      212     830    1016    1058    1204    1318    1624    1802   26080 |    1286   ticks

I used the benchmark hermit-os/hermit-rs#443, which runs 3 seconds.

Closes #630.

In contrast to linked_list_allocator, I measured a better performance.
The difference is small, but large engough to change the crate.
only the allocator needs this alignment and data size
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Looks good to me! 🥳

We should update the Cargo.lock independently, though. I opened #830.

@stlankes stlankes added this pull request to the merge queue Aug 8, 2023
Merged via the queue into hermit-os:master with commit 226a473 Aug 8, 2023
8 checks passed
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.

Consider galloc - good_memory_allocator
2 participants