scope of malloc

Doug Gwyn gwyn at smoke.brl.mil
Tue Nov 13 17:57:54 AEST 1990


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.



More information about the Comp.lang.c mailing list