Re: [gtk-list] recursive gtk_main() calls and garbage collection



Tim Janik <Tim.Janik@Hamburg.Netsurf.DE> writes:

> now gtk_main() is called recursively within the same function that did the
> alloca(), and it invokes an idle handler that does an alloc(0) call (for
> garbage collection). after the recursive call our function accesses
> the alloca()ed memory and - boom corruption...

Are you sure that it works that way?  I would expect alloca(0) to be
careful not to free memory that has been allocated in a frame below
the current one.

If it doesn't, wouldn't that be a bug in the library implementation of
alloca?

I'm only guessing here...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]