Subject: Re: CVS commit: src/sys/kern (MALLOC usage)
To: None <mason@primenet.com.au>
From: Steve Woodford <scw@netbsd.org>
List: tech-kern
Date: 06/08/2005 09:24:26
On Wednesday 08 June 2005 08:41, Geoff Wing wrote:
> Steve Woodford <scw@netbsd.org> typed:
> : Modified Files:
> : src/sys/kern: kern_sysctl.c
> :
> : Log Message:
> : Thou shalt not allocate PAGE_SIZE automatic variables on the kernel
> : stack.
> What's the policy for using MALLOC() for constant size malloc()s in
> the kernel?
=46rom MALLOC(9):
"In the comparison to malloc() and free() functions, the MALLOC() and=20
=46REE() macros may be faster, at the cost of increased code size."
Since the change was not in a performance-critical code path, I opted to=20
go for reduced code size.
Cheers, Steve