replace asserts with abort

This commit is contained in:
Theo Butler
2019-02-13 10:03:41 -05:00
parent 24ba068dce
commit 942313fec7
2 changed files with 24 additions and 27 deletions

View File

@@ -136,10 +136,6 @@ extern "C"
}
size = (std::max)(size, alignment);
if (size >= SUPERSLAB_SIZE)
{
return SNMALLOC_NAME_MANGLE(malloc)(size);
}
uint8_t sc = size_to_sizeclass(size);
if (sc >= NUM_SIZECLASSES)
{
@@ -154,8 +150,7 @@ extern "C"
return SNMALLOC_NAME_MANGLE(aligned_alloc)(alignment, size);
}
}
assert(false);
return nullptr;
return SNMALLOC_NAME_MANGLE(malloc)(SUPERSLAB_SIZE);
}
SNMALLOC_EXPORT int SNMALLOC_NAME_MANGLE(posix_memalign)(