pagemap: cast to size_t then do bit manip
Makes the CHERI compiler happier
This commit is contained in:
@@ -387,7 +387,7 @@ namespace snmalloc
|
||||
*/
|
||||
size_t index_for_address(uintptr_t p)
|
||||
{
|
||||
return reinterpret_cast<size_t>((p >> SHIFT) & (OS_PAGE_SIZE - 1));
|
||||
return bits::align_down(static_cast<size_t>(p) >> SHIFT, OS_PAGE_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user