scope of malloc

Fred Bourgeois fjb at metaware.metaware.com
Wed Nov 14 13:47:29 AEST 1990


In article <14448 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>In article <3739 at skye.ed.ac.uk> richard at aiai.UUCP (Richard Tobin) writes:
>>Are there *any* widely-used processors that can't implement alloca()
>>reasonably efficiently even with compiler support?
>
>It can't be implemented correctly (except by the compiler turning it into
>malloc()/free() calls that you could have coded yourself) on any system
>that doesn't provide separate frame and stack pointers.  Just consider
>the effects of an interrupt.  It also cannot be reasonably implemented on
>a system that uses linked stack frames, such as on the IBM System/370.

You are Wrong.

Our compiler implements alloca() as an intrinsic, and does it correctly.

... even on the 370 ...

------------------------------------------------------------------------------
Fred Bourgeois, MetaWare Inc., 2161 Delaware Avenue, Santa Cruz, CA 95060-2806
fjb at metaware.com					...!uunet!metaware!fjb
	     Colorless Green Ideas Sleep Furiously, and so do I.
------------------------------------------------------------------------------



More information about the Comp.lang.c mailing list