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

Adopt specialized autochunking allocator to support dynamic allocation #2

Merged
merged 2 commits into from
Jun 24, 2016

Conversation

geky
Copy link
Owner

@geky geky commented Jun 24, 2016

The autochunking allocator has some interesting properties:

  • O(different sizes) allocation and deallocation
  • zero fragmentation for same-sized allocations
  • no external fragmentation over time

The biggest downside is that the allocator performs no coalescing. This can create excessive fragmentation when used with a large number of different-sized allocation.

When used with a finite set of allocation sizes, this allocator approaches O(1) allocation cost, necessary for interrupt driven systems, and zero fragmentation over time, necessary for long running programs on low-memory systems.

cc @kilogram

geky added 2 commits June 21, 2016 19:43
The autochunking allocator has some interesting properties:
 - O(1) allocation and deallocation
 - zero fragmentation for same-sized allocations
 - no external fragmentation over time

The biggest downside of the allocator is that the allocator performs no
coalescing. This can create excessive fragmentation when used with a
large number of different-sized allocation.
The previous allocator used a finite set of chunk-lists. This had the
nice garuntee of strict constant allocation cost, but incurred
unnecessary fragmentation once the set was exceeded.

By using a linked-list of chunk-lists, this fragmentation can be avoided
and the chunk-list scan potenially short-circuited, at the downside of
introducing the quantity of different allocation sizes as a variable in
the allocation cost.
@geky geky merged commit 073fafb into master Jun 24, 2016
@geky geky deleted the autochunking branch June 24, 2016 02:23
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.

1 participant