[vox-tech] malloc() is ... old school?

Micah J. Cowan vox-tech@lists.lugod.org
Thu, 20 Mar 2003 09:23:07 -0800


On Wed, Mar 19, 2003 at 06:28:41PM -0800, Peter Jay Salzman wrote:
> begin Rod Roark <rod@sunsetsystems.com> 
> > Stirring up some dust... my 1978 K&R mentions alloc() and
> > calloc() but not malloc().  Then I have this 1985 "Advanced
> > UNIX - A Programmer's Guide" which does talk about malloc().
>  
> wow -- my gut reaction was wrong!   okay, so there is some kind of basis
> for that statement.  thanks, rod!

So was mine, apparently.

> 
> btw, is alloc() == alloca()?
> 

IIRC (possibly not), alloc() =~ malloc().

FWIW, alloca() is not and has never been portable. It's not in any
standard that I know of: certainly not C or POSIX.

-Micah