delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/26/17:20:51

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: memory allocation: malloc vs. calloc
Date: Sat, 26 Apr 1997 13:18:10 -0700
Organization: Alcyone Systems
Lines: 19
Message-ID: <33626302.61A9FC8D@alcyone.com>
References: <m0wKkd3-000S1vC AT natacha DOT inti DOT edu DOT ar>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Salvador Eduardo Tropea (SET) wrote:

> The function is alloca(). Be careful the stack doesn't grow when you 
> need more
> like the heap. I don't remmember if exist a variant to fill it with 
> zeros but
> you can make a memset after the alloca. Be careful alloca isn't a
> function.

Furthermore, be careful to note that alloca is not ANSI C standard and
thus any programs that use it will not be portable.

-- 
       Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
                      "The future / is right there."
                                 / Bill Moyers

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019