From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f4fd2,23202754c9ce78dd X-Google-Attributes: gidf4fd2,public X-Google-Thread: fac41,15edb893ef79e231 X-Google-Attributes: gidfac41,public X-Google-Thread: 114809,15edb893ef79e231 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,15edb893ef79e231 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-22 18:04:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!wn1feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3C4E1A0F.8060906@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.lisp,comp.lang.ada,comp.lang.eiffel,comp.lang.smalltalk Subject: Re: True faiths ( was Re: The true faith ) References: <%njZ7.279$iR.150960@news3.calgary.shaw.ca> <3c36fbc5_10@news.newsgroups.com> <4idg3u40ermnp682n6igc5gudp7hajkea9@4ax.com> <76be8851.0201101909.9db0718@posting.google.com> <9jtu3u8cq92b05j47uOrganization: LJK Software Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 23 Jan 2002 02:04:03 GMT NNTP-Posting-Host: 12.86.32.101 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 1011751443 12.86.32.101 (Wed, 23 Jan 2002 02:04:03 GMT) NNTP-Posting-Date: Wed, 23 Jan 2002 02:04:03 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.lisp:25022 comp.lang.ada:19211 comp.lang.eiffel:5506 comp.lang.smalltalk:18496 Date: 2002-01-23T02:04:03+00:00 List-Id: Larry Kilgallen wrote: > In article <3C4DFA24.4020107@worldnet.att.net>, Jim Rogers writes: > > >>Aha. There are solutions to this problem, with or without GC. >>The solution is to provide a separate storage pool for each >>thread. That storage pool could then be managed manually or by >>GC. With this design, one thread consuming its storage pool would >>not interfere with the storage usage of other threads. >> > > What happens when one thread passes an object to another thread ? > You have three choices. 1) Only objects allocated from a global storage pool can be passed between threads. 2) (Yuck) Objects are only passed by copy, not by reference. 3) Any object can be passed by reference. Objects from a local storage pool cannot be allocated by any but their local thread. This option really makes deallocation, either manual or GC, very hard to get right. :-( The first option is often enforced by multi-processor systems, where shared data must be in a special region of memory visible to all processors. In Ada terms, this region of memory would be used only for protected objects. Of course, with this option, it is still possible for a single thread to unfairly dominate memory usage. As in all cases, you stil need to design intelligently to limit storage pool contention. Jim Rogers Colorado Springs, Colorado USA