Do not call BCOPY and BZERO if size is zero
authorIvan Maidanski <ivmai@mail.ru>
Wed, 9 Aug 2017 08:10:38 +0000 (11:10 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 9 Aug 2017 08:26:14 +0000 (11:26 +0300)
commitc4f8f000273f029e9aebc8eb305a21975c853786
treef808bf98b7fe334fabeaf01dfbfc054d80a84875
parent348bc2ba8d5556f4e655675b94e1b29e80b40fdc
Do not call BCOPY and BZERO if size is zero

* dbg_mlc.c (GC_debug_strndup): Do not call BCOPY() if elements count
is zero.
* dbg_mlc.c (GC_debug_realloc): Likewise.
* finalize.c [!GC_TOGGLE_REFS_NOT_NEEDED] (ensure_toggleref_capacity):
Likewise.
* malloc.c [REDIRECT_MALLOC && !strndup] (strndup): Likewise.
* mallocx.c (GC_strndup): Likewise.
* misc.c [!GC_GET_HEAP_USAGE_NOT_NEEDED] (GC_get_prof_stats): Likewise.
* os_dep.c [SAVE_CALL_CHAIN && GC_HAVE_BUILTIN_BACKTRACE]
(GC_save_callers): Likewise.
* reclaim.c (GC_print_all_errors): Likewise.
* malloc.c (GC_free): Do not call BZERO() if elements count is zero.
* malloc.c [THREADS] (GC_free_inner): Likewise.
* reclaim.c (GC_print_all_errors): Likewise.
* misc.c [!GC_GET_HEAP_USAGE_NOT_NEEDED && THREADS]
(GC_get_prof_stats_unsafe): Do not call fill_prof_stats() and BCOPY()
if stats_sz is zero.
dbg_mlc.c
finalize.c
malloc.c
mallocx.c
misc.c
os_dep.c
reclaim.c