PDA

View Full Version : QThread stack-address



fridbert
13th November 2012, 22:10
Greetings,

I use Qt4 on Windows and I´m searching a way of getting the stack-address of a Qthread or
set the stack myself.

With pthreads it´s possible to get/set the stack-pointer by pthread_attr_getstack() and
pthread_attr_setstack().
Since QThreads are built upon pthreads there should be a solution but I only found
QThread::setStackSize and i don´t like the idea of running a pthread in my QtApp only
because of getting the address.

Would be really thankful for getting some help

amleto
13th November 2012, 22:26
what kind of dirty tricks are you doing where you need the stack pointer? :)

fridbert
13th November 2012, 22:37
All I want is to prevent the garbagecollection of my embedded interpreter running amok.

amleto
13th November 2012, 22:56
mmm, there isn't much GC happening in c++

fridbert
13th November 2012, 23:02
sorry if i didn´t express myself very good. i embedded a scriptinterpreter which is running in a qthread. and his garbagecollection needs to know the stack of the thread. otherwise it runs amok => http://bugs.ruby-lang.org/issues/2294