Subject: MALLOC vs. malloc: maybe use __builtin_constant_p?
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 03/31/2003 19:14:33
So, this commit msg made me think...
Having multiple names for approximately the same thing is annoying,
and obviously even though we've got standards on when to use MALLOC()
vs. malloc(), people get it wrong.
Maybe "The Right Thing" is to have a single blessed version, which uses
__builtin_constant_p() to check whether the arg is a constant, and
evaluates into the macro or the fn based on that...
------- Start of forwarded message -------
From: email@example.com ("Jason R Thorpe")
Subject: CVS commit: src/sys/kern
Date: Tue, 1 Apr 2003 01:41:49 +0000 (UTC)
Module Name: src
Committed By: thorpej
Date: Tue Apr 1 01:41:39 UTC 2003
* Use PAGE_SIZE rather than NBPG.
* Use malloc()/free(), rather than MALLOC()/FREE(), since the page size
might not be a compile-time constant.
To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 src/sys/kern/kern_verifiedexec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
------- End of forwarded message -------