Fix for zero size allocations.
This commit is contained in:
@@ -473,6 +473,8 @@ namespace snmalloc
|
||||
SNMALLOC_SLOW_PATH void dealloc_not_small(void* p, uint8_t size)
|
||||
{
|
||||
handle_message_queue();
|
||||
|
||||
if (p == nullptr) return;
|
||||
|
||||
if (size == PMMediumslab)
|
||||
{
|
||||
|
||||
@@ -28,9 +28,6 @@ extern "C"
|
||||
|
||||
SNMALLOC_EXPORT void SNMALLOC_NAME_MANGLE(free)(void* ptr)
|
||||
{
|
||||
if (ptr == nullptr)
|
||||
return;
|
||||
|
||||
ThreadAlloc::get()->dealloc(ptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user