> May be my problem is that p is global in my case? global variables are in the bss, and thus shared. p will have the same value in each thread, but *p should point into the stack, and thus the same virtual address will be mapped to different physical pages of memory.
however, if *p is assigned to a non-zero value before the process is created, the new page allocated for the new process' stack will have a copy of the old value, and thus not be 0. - erik