Support customize FL_INDEX_MAX to reduce the memory overhead - #19
Open
xiaoxiang781216 wants to merge 1 commit into
Open
Support customize FL_INDEX_MAX to reduce the memory overhead#19xiaoxiang781216 wants to merge 1 commit into
xiaoxiang781216 wants to merge 1 commit into
Conversation
tnodir
suggested changes
Mar 10, 2021
tnodir
approved these changes
Mar 10, 2021
tnodir
suggested changes
Mar 10, 2021
| ** or if n is zero, returns zero. | ||
| */ | ||
| #ifdef TLSF_64BIT | ||
| #define TLSF_FLS(n) ((n) & 0xffffffff00000000ull ? 32 + TLSF_FLS32((n) >> 32) : TLSF_FLS32(n)) |
There was a problem hiding this comment.
Please consider to change the:
((n) >> 32)
to:
((size_t)(n) >> 32)
because of warning with MSVC:
tlsf.c:252: warning: C4293: '>>': shift count negative or too big, undefined behavior
Author
There was a problem hiding this comment.
Done, please try again.
user can define the max pool size through TLSF_MAX_POOL_SIZE Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I021b816f65c1bc5c1025969bc6cc458029f3bc88
tnodir
approved these changes
Mar 10, 2021
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.
user can define the max pool size through TLSF_MAX_POOL_SIZE