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

Split up allocator block lists #42

Open
jfrimmel opened this issue Oct 14, 2024 · 0 comments
Open

Split up allocator block lists #42

jfrimmel opened this issue Oct 14, 2024 · 0 comments
Labels
algorithm Isses regarding the used algorithm

Comments

@jfrimmel
Copy link
Owner

Currently, the allocator has a single linked list of blocks. This is rather bad, since the two primary operations only consider a subset of those blocks:

  1. allocation is only interested in free blocks, hence each allocated block is ignored
  2. deallocation is only interested in used blocks, ignoring the free ones.

Therefore it makes sense to have two separate linked lists, one for free and one for used blocks. This should make maintaining the lists somewhat easier as well, as the lists have now a narrower scope. It certainly will speed up the searching for blocks, since only candidates for the operation in question are considered.

@jfrimmel jfrimmel added the algorithm Isses regarding the used algorithm label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithm Isses regarding the used algorithm
Projects
None yet
Development

No branches or pull requests

1 participant