Re: D's New GC and Object Allocation Pools

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d
On 10/25/14 8:37 PM, Maxime Chevalier-Boisvert wrote: Hello, I was wondering if there have been updates regarding Andrei's announcement that he would rewrite the D garbage collector. Is there any kind of timeline for when a new version of the GC can be expected? There is no timeline as of now.

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 23:20:21 UTC, Mike wrote: Language support for this kind of thing would be nice. `@weak` attribute[1] perhaps, or `virtual`/`final` module methods anyone? `final` by default please. :) [1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Function-Attributes.html#Fu

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 14:13:25 UTC, Maxime Chevalier-Boisvert wrote: What I'm trying to do is have some specific classes be pool-allocated though, not completely circumvent the GC. The method I proposed just overrides `new` (i.e. _d_newclass). What goes inside of `new` is up to you,

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Kagamin via Digitalmars-d
On Sunday, 26 October 2014 at 14:14:43 UTC, Maxime Chevalier-Boisvert wrote: I'll do that if I have to, but it's cleaner with an override of new as it makes it impossible to mistakenly allocate the object outside of the pool. It's also nicer if you can pass arguments to your constructor. Such

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Kagamin via Digitalmars-d
Came up a while ago: http://forum.dlang.org/post/komuednbngkbeirrr...@forum.dlang.org

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Sean Kelly via Digitalmars-d
On Sunday, 26 October 2014 at 03:37:47 UTC, Maxime Chevalier-Boisvert wrote: I also wanted to ask if there was an implementation of an object pool in the standard library. If not, I'm wondering what the best way to implement this is. Is there any way to overload new and destroy? Andrei has

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Maxime Chevalier-Boisvert via Digitalmars-d
I'll do that if I have to, but it's cleaner with an override of new as it makes it impossible to mistakenly allocate the object outside of the pool. It's also nicer if you can pass arguments to your constructor. On Sunday, 26 October 2014 at 11:16:39 UTC, Damian wrote: On Sunday, 26 October 20

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Maxime Chevalier-Boisvert via Digitalmars-d
What I'm trying to do is have some specific classes be pool-allocated though, not completely circumvent the GC. On Sunday, 26 October 2014 at 08:02:25 UTC, Mike wrote: On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote: I tried this on my Linux desktop, and while everything compiled and l

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Damian via Digitalmars-d
On Sunday, 26 October 2014 at 03:37:47 UTC, Maxime Chevalier-Boisvert wrote: Hello, I was wondering if there have been updates regarding Andrei's announcement that he would rewrite the D garbage collector. Is there any kind of timeline for when a new version of the GC can be expected? I als

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Iain Buclaw via Digitalmars-d
On 26 Oct 2014 08:05, "Mike via Digitalmars-d" wrote: > > On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote: > >> I tried this on my Linux desktop, and while everything compiled and linked without errors, it resulted in a segmentation fault at runtime. But where I have failed, others may suc

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote: I tried this on my Linux desktop, and while everything compiled and linked without errors, it resulted in a segmentation fault at runtime. But where I have failed, others may succeed. I tested with LDC and GDC, but not DMD. It does wo

Re: D's New GC and Object Allocation Pools

2014-10-26 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 04:22:29 UTC, Mike wrote: but there may be a way to link in your implementations instead of the defaults at link time, thus giving you an "override" effect. The technique I was thinking of here is the --wrap option in the ld linker [1] (See the bottom of the pa

Re: D's New GC and Object Allocation Pools

2014-10-25 Thread Kyoji Klyden via Digitalmars-d
On Sunday, 26 October 2014 at 03:37:47 UTC, Maxime Chevalier-Boisvert wrote: Hello, I was wondering if there have been updates regarding Andrei's announcement that he would rewrite the D garbage collector. Is there any kind of timeline for when a new version of the GC can be expected? I als

Re: D's New GC and Object Allocation Pools

2014-10-25 Thread Mike via Digitalmars-d
On Sunday, 26 October 2014 at 03:37:47 UTC, Maxime Chevalier-Boisvert wrote: I also wanted to ask if there was an implementation of an object pool in the standard library. If not, I'm wondering what the best way to implement this is. Is there any way to overload new and destroy? I'm not an

D's New GC and Object Allocation Pools

2014-10-25 Thread Maxime Chevalier-Boisvert via Digitalmars-d
Hello, I was wondering if there have been updates regarding Andrei's announcement that he would rewrite the D garbage collector. Is there any kind of timeline for when a new version of the GC can be expected? I also wanted to ask if there was an implementation of an object pool in the stand