D on next-gen consoles and for game development
deadalnix
deadalnix at gmail.com
Fri May 24 22:29:26 PDT 2013
On Saturday, 25 May 2013 at 05:18:12 UTC, Manu wrote:
> On 25 May 2013 15:00, deadalnix <deadalnix at gmail.com> wrote:
>
>> On Saturday, 25 May 2013 at 01:56:42 UTC, Manu wrote:
>>
>>> Understand, I have no virtual-memory manager, it won't page,
>>> it's not a
>>> performance problem, it will just crash if I mis-calculate
>>> this value.
>>>
>>
>> So the GC is kind of out.
>>
>
> Yeah, I'm wondering if that's just a basic truth for embedded.
> Can D implement a ref-counting GC? That would probably still be
> okay, since
> collection is immediate.
>
This is technically possible, but you said you make few
allocations. So with the tax on pointer write or the reference
counting, you'll pay a lot to collect very few garbages. I'm not
sure the tradeoff is worthwhile.
Paradoxically, when you create few garbage, GC are really goos as
they don't need to trigger often. But if you need to add a tax on
each reference write/copy, you'll probably pay more tax than you
get out of it.
> Modern consoles and portables have plenty of memory; can use a
> GC, but
> simpler/embedded platforms probably just can't. An alternative
> solution
> still needs to be offered for that sort of hardware.
More information about the Digitalmars-d
mailing list