[libdispatch-dev] libdispatch threads stack size
mroi at os.inf.tu-dresden.de
Wed Mar 5 13:35:12 PST 2014
> We are using a library (out of our control) which is crashing our program apparently because it consumes all available stack space. We are not in control of the underlying threads since they are created by the libdispatch. Anything we can do here or are we back to managing pthreads?
If stack space is a problem, could you just allocate a large slab of memory on the heap, point ESP there and then call into that problematic library? Then revert back to the original stack when control returns from the library to you. It’s just an idea, I have not tried that. You would have to know, how much memory you need, though, as the heap allocation obviously does not grow automatically.
More information about the libdispatch-dev