mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
move null ptr check
This commit is contained in:
parent
f54e64365f
commit
d3715132d1
2 changed files with 2 additions and 3 deletions
|
@ -426,8 +426,7 @@ static inline mi_page_t* _mi_get_free_small_page(size_t size) {
|
|||
|
||||
// Segment that contains the pointer
|
||||
static inline mi_segment_t* _mi_ptr_segment(const void* p) {
|
||||
// mi_assert_internal(p != NULL);
|
||||
if (p == NULL) return NULL;
|
||||
mi_assert_internal(p != NULL);
|
||||
return (mi_segment_t*)(((uintptr_t)p - 1) & ~MI_SEGMENT_MASK);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue