Is there a way to check if a pointer is supposed to point to
non-GC allocated memory? I presume not. This is needed to prevent
unnecessary calls to `GC.addRange` in containers with elements of
a type that in turn is a container-like struct with non-GC
allocated memory.
If not, maybe we could
On 10/15/2016 12:22 PM, Nordlöw wrote:
Is there a way to check if a pointer is supposed to point to non-GC
allocated memory? I presume not. This is needed to prevent unnecessary
calls to `GC.addRange` in containers with elements of a type that in
turn is a container-like struct with non-GC alloca
On Saturday, 15 October 2016 at 17:11:28 UTC, Andrei Alexandrescu
wrote:
Seems there'd be quite some annotational overhead.
In the case of a C++-style vector it's just a matter of changing
E* _ptr;// non-GC-allocated store pointer
to
@nogc E* _ptr; // GC-allo
On Saturday, 15 October 2016 at 17:19:53 UTC, Nordlöw wrote:
E* _ptr;// non-GC-allocated store pointer
to
@nogc E* _ptr; // GC-allocated store pointer
should, of course, be
E* _ptr;// GC-allocated store pointer
to
@nogc E* _ptr;
On 10/15/2016 07:19 PM, Nordlöw wrote:
and then updating the relevant trait, such as `hasIndirections` or/and
`hasAliasing`, to respect this attribute.
How would those traits have to updated? An indirection is an indirection
no matter if it points to GC memory or not. Maybe we'd need a new tra
On Saturday, 15 October 2016 at 16:22:35 UTC, Nordlöw wrote:
Is there a way to check if a pointer is supposed to point to
non-GC allocated memory? I presume not. This is needed to
prevent unnecessary calls to `GC.addRange` in containers with
elements of a type that in turn is a container-like s
On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote:
To be honest I find this system way more useful that the
function attribute @nogc.
My trait is here
(https://github.com/BBasile/iz/blob/master/import/iz/memory.d#L145) but it's quite similar to the one used in EMSI containers (with d
On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote:
I agree. We are several people to do it already. I've started
to during last spring (see
https://forum.dlang.org/post/ficbsdfokvbvslatm...@forum.dlang.org).
So far I use "@NoGc" and "@TellGcRange" added.
Why does the template argu
On Saturday, 15 October 2016 at 19:36:19 UTC, Nordlöw wrote:
On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote:
I agree. We are several people to do it already. I've started
to during last spring (see
https://forum.dlang.org/post/ficbsdfokvbvslatm...@forum.dlang.org).
So far I use
On Sat, 15 Oct 2016 16:22:35 +, Nordlöw wrote:
> Is there a way to check if a pointer is supposed to point to non-GC
> allocated memory?
You can check if it *does* point to GC-allocated memory if you use GC
internals -- the Pool struct is what you want to look at, and the lookup
methods ass
On Sunday, 16 October 2016 at 04:14:42 UTC, Chris Wright wrote:
On Sat, 15 Oct 2016 16:22:35 +, Nordlöw wrote:
Is there a way to check if a pointer is supposed to point to
non-GC allocated memory?
You can check if it *does* point to GC-allocated memory if you
use GC internals -- the Pool
On Saturday, 15 October 2016 at 18:03:54 UTC, Nordlöw wrote:
On Saturday, 15 October 2016 at 17:48:13 UTC, Basile B. wrote:
To be honest I find this system way more useful that the
function attribute @nogc.
My trait is here
(https://github.com/BBasile/iz/blob/master/import/iz/memory.d#L145) but
On 10/15/2016 02:50 PM, Basile B. wrote:
I've given up with the idea of proposing my stuff in phobos. About
memory there would also have be:
- allocators-based factory (https://github.com/dlang/phobos/pull/4062)
- @nogc dispose (https://github.com/dlang/phobos/pull/4351)
But each time the PR wa
13 matches
Mail list logo