svn commit: r327674 - in head: share/man/man9 sys/kern sys/sys

Kristof Provost kp at FreeBSD.org
Sun Jan 7 18:00:47 UTC 2018



On 7 Jan 2018, at 18:55, Rodney W. Grimes wrote:

> [ Charset UTF-8 unsupported, converting... ]
>> Author: kp
>> Date: Sun Jan  7 13:21:01 2018
>> New Revision: 327674
>> URL: https://svnweb.freebsd.org/changeset/base/327674
>>
>> Log:
>>   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
>>

>> Modified: head/sys/kern/kern_malloc.c
>> ==============================================================================
>> --- head/sys/kern/kern_malloc.c	Sun Jan  7 10:29:15 2018	(r327673)
>> +++ head/sys/kern/kern_malloc.c	Sun Jan  7 13:21:01 2018	(r327674)
>> @@ -4,6 +4,7 @@
>>   * Copyright (c) 1987, 1991, 1993
>>   *	The Regents of the University of California.
>>   * Copyright (c) 2005-2009 Robert N. M. Watson
>> + * Copyright (c) 2008 Otto Moerbeek <otto at drijf.net> (mallocarray)
>
> Is this code really over a decade old????  or is this a typo?
>
>
That’s the copyright statement OpenBSD have for it, and that’s where 
it came from:
https://github.com/openbsd/src/blob/3031d9a2ee043e48086ede83d43c1e37d034aff4/sys/kern/kern_malloc.c#L705

Regards,
Kristof


More information about the svn-src-head mailing list