[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MiNT problems...
George Simunovich wrote:
>
>I was having a lot of the same problems that people seem to be having.
>My problems were that some of the GNU utilities quit working after
>patching MiNT 1.10 to h1 and later. I found the problem was GNU C's
>builtin alloca routine. It seems that alloca was not requesting memory
>from the OS but getting the memory from the program's (stack or heap not
>real sure).
That's what alloca does. GNU software is notorious for using alloca rather
than malloc. I don't know why - probably so they don't have to remember
to delete it.
>From a man entry:
alloca() allocates size bytes of space in the stack frame of
the caller, and returns a pointer to the allocated block.
This temporary space is automatically freed when the caller
returns. Note: if the allocated block is beyond the current
stack limit, the resulting behavior is undefined.
--
Warwick