mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 09:03:33 +03:00
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:
parent
80b25932ca
commit
96d4120ac0
5 changed files with 37 additions and 22 deletions
|
|
@ -65,7 +65,7 @@ DOCS_HTML := $(DOCS_XML:@objroot@%.xml=@srcroot@%.html)
|
|||
DOCS_MAN3 := $(DOCS_XML:@objroot@%.xml=@srcroot@%.3)
|
||||
DOCS := $(DOCS_HTML) $(DOCS_MAN3)
|
||||
CTESTS := @srcroot@test/aligned_alloc.c @srcroot@test/allocated.c \
|
||||
@srcroot@test/bitmap.c @srcroot@test/mremap.c \
|
||||
@srcroot@test/bitmap.c @srcroot@test/mremap.c @srcroot@test/null.c \
|
||||
@srcroot@test/posix_memalign.c @srcroot@test/thread_arena.c \
|
||||
@srcroot@test/thread_tcache_enabled.c
|
||||
ifeq (@enable_experimental@, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue