New pointer type for GC
Sean Kelly via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 4 13:16:57 PDT 2014
On Tuesday, 27 May 2014 at 02:52:48 UTC, Etienne Cimon wrote:
> I've been looking at the GC and found that the main problem is
> that there's no clear information about the pointers. At least
> smart pointers have some info inside them but GC pointers are
> completely plain 4-8 bytes and nothing else.
>
> The GC is very fast even if it needs to lookup this info but I
> believe it wouldn't stay low-cpu in a 128 GB of RAM server with
> 3GB/s of memory traffic with a wide range of memory segment
> sizes.
>
> I think a decent proposal would be to
> 1- Introduce a new GC pointer type, e.g. a void' (its an
> apostrophee) used also in classes which implicitely converts to
> void* by removing the last bytes (which ontain the info). This
> pointer contains the Pool ID of the underlying memory
I think in SafeD it might be possible to just make this
automatic. I don't see it ever happening in D proper though.
What happens if I pass a dynamic array of pointers to memset?
More information about the Digitalmars-d
mailing list