From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 4 Jun 2004 09:39:42 -0500 From: Russ Cox To: 9fans <9fans@cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [9fans] stack reclamation on Unix using clone, rfork_thread, etc. Topicbox-Message-UUID: 94f31ce4-eacd-11e9-9e20-41e7f4b1d025 Anyone have any idea how one is supposed to arrange to free the stack on which a shared-memory proc is running? In my current implementation, I have a routine called stackalloc() that keeps a list of all stacks ever allocated along with the pids they were allocated for, and every Nth time it gets called, it scans the list freeing the stacks that correspond to processes that no longer exist. Damn TLB-friendly operating systems. Russ