mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 04:03:11 +00: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user