Page MenuHomeFreeBSD

Make use of the newly introduce mallocarray(9).
ClosedPublic

Authored by pfg on Jan 10 2018, 8:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 23, 6:29 PM
Unknown Object (File)
Fri, Aug 21, 1:22 PM
Unknown Object (File)
Thu, Aug 20, 8:34 PM
Unknown Object (File)
Thu, Aug 20, 12:50 PM
Unknown Object (File)
Thu, Aug 20, 10:55 AM
Unknown Object (File)
Wed, Aug 19, 4:12 PM
Unknown Object (File)
Tue, Aug 18, 8:21 PM
Unknown Object (File)
Tue, Aug 11, 3:58 PM
Subscribers

Details

Summary

Not sure there is any chance of an overflow here but perhaps this also
makes the code easier to read.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Why didn't they provide a calloc(), to follow the malloc()/free() pattern?

(It looks like this was introduced in rS327674)

This revision is now accepted and ready to land.Jan 10 2018, 9:54 PM
In D13833#290191, @erj wrote:

Why didn't they provide a calloc(), to follow the malloc()/free() pattern?

(It looks like this was introduced in rS327674)

And I forgot that not everyone wants the memory they allocate to be zeroed, though the driver zeroes it in all of the calls that are being replaced here.

This revision was automatically updated to reflect the committed changes.