Skip to content

Conversation

xiaoxiang781216
Copy link

user can define the max pool size through TLSF_MAX_POOL_SIZE

tlsf.c Outdated
** or if n is zero, returns zero.
*/
#ifdef TLSF_64BIT
#define TLSF_FLS(n) ((n) & 0xffffffff00000000ull ? 32 + TLSF_FLS32((n) >> 32) : TLSF_FLS32(n))
Copy link

Choose a reason for hiding this comment

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

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

Copy link
Author

Choose a reason for hiding this comment

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

Done, please try again.

user can define the max pool size through TLSF_MAX_POOL_SIZE

Signed-off-by: Xiang Xiao <[email protected]>
Change-Id: I021b816f65c1bc5c1025969bc6cc458029f3bc88
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.

2 participants