mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
redefine mi_likely/mi_unlikely to work with C++ 20 [[likely]] attributes
This commit is contained in:
parent
d69d4c861f
commit
7bc602ebb4
12 changed files with 67 additions and 64 deletions
|
@ -410,7 +410,7 @@ static mi_heap_t* mi_heap_of_block(const void* p) {
|
|||
mi_segment_t* segment = _mi_ptr_segment(p);
|
||||
bool valid = (_mi_ptr_cookie(segment) == segment->cookie);
|
||||
mi_assert_internal(valid);
|
||||
if (mi_unlikely(!valid)) return NULL;
|
||||
if mi_unlikely(!valid) return NULL;
|
||||
return mi_page_heap(_mi_segment_page_of(segment,p));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue