pthread_attr_setstack & release stack pointer

18/04/2011 - 13:08 von Johann Obermayr | Report spam
Hello,

We use pthread_attr_setstack to set stacksize & stack pointer.

On which time we can release the stack pointer ?

On end of the thread start_routine i think it's to early.
Because the thread is'n finished, but a other thread can alloc
and overwrite this memory area.

Jimmy
 

Lesen sie die antworten

#1 Rainer Weikusat
20/04/2011 - 12:37 | Warnen spam
Johann Obermayr writes:
We use pthread_attr_setstack to set stacksize & stack pointer.

On which time we can release the stack pointer ?



According to the UNIX(*) standard, never, cf

http://pubs.opengroup.org/onlinepub...ap02.html,
section 2.9.8

Ähnliche fragen