Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" 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 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: memory allocation: malloc vs. calloc Precedence: bulk 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