More radical ideas about gc and reference counting

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Sat May 10 09:24:17 PDT 2014


Am 10.05.2014 15:28, schrieb Manu via Digitalmars-d:
> On 10 May 2014 16:53, Paulo Pinto via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
>> Am 10.05.2014 08:27, schrieb Manu via Digitalmars-d:
>>>
>>> On 10 May 2014 07:05, Wyatt via Digitalmars-d
>>> <digitalmars-d at puremagic.com> wrote:
>>>>
>>>> On Friday, 9 May 2014 at 16:12:00 UTC, Manu via Digitalmars-d wrote:
>>>> ...
>>>
>>> The only option I know that works is Obj-C's solution, as demonstrated
>>> by a very successful embedded RTOS, and compared to competition, runs
>>> silky smooth. Indeed iOS makes it a specific design goal that it
>>> should always feel silky smooth, never stuttery, they consider it a
>>> point of quality, and I completely agree. I don't know what other
>>> horse to back?
>>> ...
>>
>>
>> The problem when comparing iOS with Android, is that we aren't comparing ARC
>> with GC.
>>
>> We are comparing a full OS, which we don't know how much ARC is actually
>> used versus standard malloc/new with another OS, which has a
>> so-and-so VM implementation, used mostly software rendering until version
>> 4.1, and care for low end devices was only done in 4.4.
>>
>> If we add Windows Phone to the mix, then we have a .NET stack like Android
>> (WP7 - GC/JIT) or in its sucessor (WP8)  native code generation for .NET
>> (GC) with a COM model for OS APIs (ARC).
>>
>> Both versions of Windows Phone run smoother that many Android phones, even
>> the WP7 ones.
>>
>> Not saying you are not right, just that we need to look at the whole stack
>> when comparing mobile OS, not just GC vs ARC.
>
> Yes, granted. I shouldn't make that sort of comparison. What I am
> really trying to do with such comments, is to insist that it is used
> as a foundation for a very successful RTOS. To say "it's no good. ARC
> can't work. it can never be used as a foundation for a language. but,
> cycles!" and whatever, is kind of ignoring the evidence.
> It's interesting too that you bring Windows phone into the mix,
> because all the WP8 developers I know use microsoft's C++/CX, which
> has the new '^' ARC pointer type (as used intensively by the OS).
> Why did MS abandon GC? It looks like a similar sort of back-peddling
> from their commitment to GC as did Apple, when they started making a
> serious play for the embedded market.

They did not. A Windows Phone 8 application, if coded in .NET still uses 
a GC for the .NET world.

http://blogs.msdn.com/b/abhinaba/archive/2012/11/08/windows-phone-8-evolution-of-the-runtime-and-application-compatibility.aspx

ARC is used in C++/CX due to the COM nature of WinRT.

After all the Windows Runtime is nothing more than COM with
IInspectable as new derived interface from IUnknown.

Which was actually the original design of .NET, COM+ VOS, before they 
decided to go MSIL.

http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-32-72-38/Ext_2D00_VOS.pdf


If anything, the native side has won the current internal politics war 
and they are steering the boat back to ahead of time compilation.


>
> C# implies massive GC related issues for realtime and embedded
> software. I have lots of colleagues who rant about it regularly, and
> my experience from 2 weekends back that I shared earlier in this
> thread is a scary slap in the face for me.
>

Where those experiences with Unity/Mono or proper .NET?

Unity still uses Mono 2.6 from 2009, when Mono was under SuSE control. 
Entity to whom Unity has an agreement.

http://unity3d.com/unity/faq#section-1828
==> What version of Mono is used for 4.x? Can I use all .NET features?

A new generational garbage collector was introduced in Mono with version 
2.8 (2010) and improved in consequent releases.

http://www.mono-project.com/Release_Notes_Mono_2.8

It became the default GC in the latest version, currently 3.2.

--
Paulo


More information about the Digitalmars-d mailing list