From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 5 Sep 2015 11:47:17 -0700 To: 9fans@9fans.net Message-ID: <8b5a65de5cd93ec6242b885530caf86f@brasstown.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Privalloc(2) and rfork(RFPROC|RFMEM) (was: a pair nec bugs) Topicbox-Message-UUID: 69058732-ead9-11e9-9d60-3106f5b1d025 > 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