avoid type comparison warning on some platforms

pull/138/head
Daniel Micay 2021-02-16 17:18:06 -05:00
parent 29b09648d6
commit ddd14bc421
1 changed files with 1 additions and 1 deletions

View File

@ -1178,7 +1178,7 @@ static size_t get_large_size_class(size_t size) {
// 512 KiB [2560 KiB, 3 MiB, 3584 KiB, 4 MiB] // 512 KiB [2560 KiB, 3 MiB, 3584 KiB, 4 MiB]
// 1 MiB [5 MiB, 6 MiB, 7 MiB, 8 MiB] // 1 MiB [5 MiB, 6 MiB, 7 MiB, 8 MiB]
// etc. // etc.
size = max(size, PAGE_SIZE); size = max(size, (size_t)PAGE_SIZE);
size_t spacing_shift = 64 - __builtin_clzl(size - 1) - 3; size_t spacing_shift = 64 - __builtin_clzl(size - 1) - 3;
size_t spacing_class = 1ULL << spacing_shift; size_t spacing_class = 1ULL << spacing_shift;
return (size + (spacing_class - 1)) & ~(spacing_class - 1); return (size + (spacing_class - 1)) & ~(spacing_class - 1);