On Thu, Apr 12, 2012 at 6:02 AM, Bennie Kloosteman <[email protected]>wrote:

>
>> This, of course, is insufficient for multithreaded programs.
>>
>>
>>> ...you can write tight loops which are strict
>>>
>>> enough to guarantee no allocation and therefore no GC.
>>>
>>
>> My sense, as yet undemonstrated, is that it may be a bit more scalable in
>> something like BitC, where unboxed types are available.
>>
>
> You can do something similar in C# with stackalloc and some trickery  (
> which Bitc would do significantly better) however in a many threaded app
> all the other threads cant be causing allocations either  so it works
> better a  single thread/message pump .
>

Yes. This is actually one of the places where regions help a lot. One of
the kinds of analysis you can do (conservatively) is determine whether an
object ever escapes to some thread *other than* it's allocating thread.
Thread-affine objects can be GC'd without coordination, and can be accessed
without concerns over concurrency.

shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to