Avoid NULL check in free() and malloc_usable_size().

Generalize isalloc() to handle NULL pointers in such a way that the NULL
checking overhead is only paid when introspecting huge allocations (or
NULL).  This allows free() and malloc_usable_size() to no longer check
for NULL.

Submitted by Igor Bukanov and Mike Hommey.
This commit is contained in:
Jason Evans
2012-04-02 14:50:03 -07:00
parent 80b25932ca
commit 96d4120ac0
5 changed files with 37 additions and 22 deletions
+2
View File
@@ -0,0 +1,2 @@
Test begin
Test end