iPhone vs Android
Laeeth Isharc via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 13 10:48:38 PDT 2016
On Tuesday, 13 September 2016 at 11:59:46 UTC, Shachar Shemesh
wrote:
> On 13/09/16 02:21, deadalnix wrote:
>>
>> I stay convinced that an hybrid approach is inevitable and am
>> surprised
>> why few are going there (hello PHP, here right).
>>
>
> Here's my worries about the hybrid approach. The GC run time is
> proportional not to the amount of memory you manage with the
> GC, but to the amount of memory that might hold a pointer to a
> GC managed memory. In other words, if most of my memory is RC
> managed, but some of it is GC, I pay the price of both memory
> manager on most of my memory.
>
> Shachar
Hi Shachar.
I hope you're well.
Would you mind elaborating a bit on why the cost of GC managed
memory is as high as you imply when combined with other
approaches, at least on a 64 bit machine and presuming you have a
degree of hygiene and don't directly use a pointer allowed to
point to either. Eg if you use GC for long lived allocations
and RC for short lived ones (and the RC constructor makes sure
the thing is not registered with the GC so that takes care of
short lived parts of long lived structures), how in practice
would this be a problem ? I am no GC expert, but keen to update
my mental model.
Laeeth
More information about the Digitalmars-d
mailing list