HomeFreeBSD

Introduce mallocarray() in the kernel

Description

Introduce mallocarray() in the kernel

Similar to calloc() the mallocarray() function checks for integer
overflows before allocating memory.
It does not zero memory, unless the M_ZERO flag is set.

Reviewed by: pfg, vangyzen (previous version), imp (previous version)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D13766

Details

Provenance
kpAuthored on
Reviewer
pfg
Differential Revision
D13766: Introduce mallocarray() in the kernel
Parents
rS327673: MFC r326769:
Branches
Unknown
Tags
Unknown