From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <438E128F.3080103@Princeton.EDU> Date: Wed, 30 Nov 2005 15:58:55 -0500 From: Martin Harriss User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20051012) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Threadcreate() failure value? References: <438E048B.50808@lanl.gov> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: b475aa84-ead0-11e9-9d60-3106f5b1d025 >>what if your create failed due to some other process having the process >>leak, and you'd like your process, which has done nothing wrong, to get >>out of the mess cleanly? One of the problems is that the program that finds itself unable to proceed for lack of resources may not be able to recover because it needs resources to run the recovery mechanism. This was dicussed a long time ago wrt memory allocation for Modula 3. See, for example: http://www.elegosoft.com/pm3/intro/questions/new.html (I'm sure that somewhere I've seen a more basic description of why handling out-of-memory conditions is diffucult, but I can't find it right now.) I'd be the first to admit that this is a somewhat different case because M3 relies heavily on dynamic memory allocation and garbage collection, but I think that in general terms the issues are the same. Martin