Fix 32bit external pointer.
For 32bit external pointer it was performing a divide by size, and for things not managed by snmalloc this was causing a crash. This checks for zero, and gives the start of the address range as the start of the object.
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
a0377f62eb
commit
1e1104a11c
@@ -357,6 +357,8 @@ namespace snmalloc
|
||||
}
|
||||
else
|
||||
{
|
||||
if (size == 0)
|
||||
return 0;
|
||||
return slab_start + (offset / size) * size;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user