Subject: Re: ssp and gcc-4.1
To: Mindaugas <>
From: Thor Lancelot Simon <>
List: tech-kern
Date: 11/06/2006 20:39:56
On Tue, Nov 07, 2006 at 02:06:54AM +0200, Mindaugas wrote:
> Great work, Christos!
> > 	- malloc vs alloca performance
> Well, alloca performs much better, but the main problem, that it is not
> supported by all platforms, is it?

I'm not sure what you're getting at.  It is certainly the case that we
conform to the relevant standards by supplying alloca() on all platforms.

Most of the problematic code in our kernel is actually calling GCC's
__builtin_alloca() by way of variable size array declarations.  Some of
it will be quite tricky to replace with malloc -- e.g. because it is
in the VM system itself, or because it is called from interrupt context
but has no graceful way to report an allocation failure.

  Thor Lancelot Simon	                           

  "We cannot usually in social life pursue a single value or a single moral
   aim, untroubled by the need to compromise with others."      - H.L.A. Hart