Conversation
For sizes below BLOCK_SIZE_SMALL (FL=0 range), SL mapping is linear at ALIGN_SIZE granularity. This bypasses log2floor, round_block_size, and mapping by probing t->sl[0] directly and computing the SL index with a shift. Falls through to the generic block_find_free path when FL=0 bins are empty or the request exceeds the small range.
WCET Results (x86-64) |
WCET Results (arm64) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For sizes below BLOCK_SIZE_SMALL (FL=0 range), SL mapping is linear at ALIGN_SIZE granularity. This bypasses log2floor, round_block_size, and mapping by probing t->sl[0] directly and computing the SL index with a shift. Falls through to the generic block_find_free path when FL=0 bins are empty or the request exceeds the small range.
Summary by cubic
Add a fast path in tlsf_malloc for small allocations (size < BLOCK_SIZE_SMALL) using linear SL mapping in the FL=0 range. This skips log2floor and size rounding, reduces work per call, and speeds up tiny allocations while preserving the existing fallback path.
Written for commit b8fc2bb. Summary will update on new commits.