[asterisk-dev] Problems with ast_realloc Version 1.4.5
Russell Bryant
russell at digium.com
Mon Jun 25 13:40:46 CDT 2007
Matthew Fredrickson wrote:
> Alloca() does not allocate memory on the heap, like malloc() and
> friends. It allocates memory on the stack. That's why you can't
> realloc the pointer.
However, I think we have an ast_realloca() somewhere, but the name is quite
deceiving. It doesn't reallocate anything. It just allocates a new block on
the stack and copies the data from the old buffer into the new one.
--
Russell Bryant
Software Engineer
Digium, Inc.
More information about the asterisk-dev
mailing list