When full malloc is enabled and SYS_MALLOC_F is also enabled, the
simple pre-reloc heap is used before relocation. The calloc_must_clear
macro relies on chunk metadata which does not exist for simple malloc
allocations.
Use memset directly to zero out memory from simple malloc.
Changes from original commit:
- Port to dlcalloc() in dlmalloc 2.8.6
- Update memset() second arg to be a char
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
(cherry picked from bb71a2d9dc)