History log of /src/lib/libc/stdlib/recallocarray.c (Results 1 – 3 of 3)
Revision Date Author Comments
# 42664610 02-Oct-2025 Robert Clausecker <fuz@FreeBSD.org>

lib/libc: add recallocarray()

This function from OpenBSD is a hybrid of reallocarray() and calloc().
It reallocates an array, clearing any newly allocated items.
reallocarray() ultimately originates

lib/libc: add recallocarray()

This function from OpenBSD is a hybrid of reallocarray() and calloc().
It reallocates an array, clearing any newly allocated items.
reallocarray() ultimately originates from OpenBSD.

The source is taken from lib/libopenbsd, which now no longer has the
function unless when bootstrapping (needed for mandoc).

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52863

show more ...


# 7233893e 02-Oct-2025 Robert Clausecker <fuz@FreeBSD.org>

lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray

Summary:
This makes the code easier to understand and slightly faster,
but requires C23. calloc() would benefit, too, but I d

lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray

Summary:
This makes the code easier to understand and slightly faster,
but requires C23. calloc() would benefit, too, but I didn't
want to touch the imported jemalloc code base.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52854

show more ...


# 71a0af25 16-Jun-2025 Ricardo Branco <rbranco@suse.de>

libopenbsd: Add recallocarray()

Reviewed by: kib
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/1698