On Thu, Dec 6, 2012 at 8:46 AM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote: > Fetch the thread info and check against the thread's stack, when the > heuristic fails? It will probably mostly work, but I can imagine that it > might not, if one also allocates a largish buffer on the stack (e.g. > char[B_PATH_NAME_LENGTH]). > > BTW, you can use size_t instead of messing around with int64. Not sure, if > it adds to the readability, but at least theoretically int64 could overflow > on 64-bit architectures. Will do that tonight, from the initial discussion I assumed we wanted to avoid calling get_thread_info() entirely for performance reasons. Regards, Rene