iPhone vs Android

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 14 06:37:03 PDT 2016


On Wednesday, 14 September 2016 at 13:28:45 UTC, finalpatch wrote:
> On Tuesday, 13 September 2016 at 18:24:26 UTC, deadalnix wrote:
>> No you don't, as how often the GC kicks in depend of the rate 
>> at which you produce garbage, which is going to be very low 
>> with an hybrid approach.
>
> This is simply not true.
>
> Assume in a pure GC program the GC heap can grow up to X Mb 
> before a collection cycle happens, which has to scan X Mb of 
> memory.
>
> Now let's say we have a hybrid program that uses 0.5X Mb of 
> RCed memory and 0.5X Mb of GC memory so the total memory 
> consumption is still X Mb. When the GC heap reaches 0.5X Mb, it 
> has to scan both RC and GC memory.

Could you elaborate? I thought based on both personal experience 
and the papers referred to that it's uncontroversial a GC program 
to run efficiently will need a multiple of actually used memory 
as available memory.   Thus the hybrid program should require 
less total memory than the pure GC program,  meaning at the same 
total memory consumption there is less GC pressure,  which I 
understood to be part of deadalnix  point.




More information about the Digitalmars-d mailing list