delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/25/15:23:05

Message-Id: <m0wKkd3-000S1vC@natacha.inti.edu.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
Organization: INTI
To: mejm2 AT hermes DOT cam DOT ac DOT uk (Michael Meeks), djgpp AT delorie DOT com
Date: Fri, 25 Apr 1997 16:18:17 +0000
MIME-Version: 1.0
Subject: Re: memory allocation: malloc vs. calloc

mejm2 AT hermes DOT cam DOT ac DOT uk (Michael Meeks) wrote:
> 	I'm lost here, which is the alloc that gets temp. memory from the
> stack, and saves fragmentation ? and is there a variant of that that zeros
> the memory ?
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.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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