Re: How to destruct class instances allocated by a Region-allocator over a single GC block

2018-04-02 Thread Alexandru Jercaianu via Digitalmars-d-learn
On Monday, 2 April 2018 at 14:52:34 UTC, Per Nordlöw wrote: As a follow-up to https://forum.dlang.org/post/jfgpngdudtprzznrc...@forum.dlang.org [...] Hi, I am not completely sure how to solve this, but maybe we can find some clues here [1]. It seems like we should use addRoot on the buffer

Re: Fast GC allocation of many small objects

2018-04-01 Thread Alexandru jercaianu via Digitalmars-d-learn
On Saturday, 31 March 2018 at 20:17:26 UTC, Per Nordlöw wrote: On Friday, 30 March 2018 at 23:09:33 UTC, Alexandru Jercaianu wrote: Hello, You can try the following: struct Node { char[64] arr; } enum numNodes = 100_000_000; void[] buf =

Re: Fast GC allocation of many small objects

2018-03-30 Thread Alexandru Jercaianu via Digitalmars-d-learn
On Friday, 30 March 2018 at 23:09:33 UTC, Alexandru Jercaianu wrote: On Friday, 30 March 2018 at 20:46:43 UTC, Per Nordlöw wrote: On Friday, 30 March 2018 at 20:38:35 UTC, rikki cattermole wrote: Use a custom allocator (that could be backed by the GC) using std.experimental.allocators :)

Re: Fast GC allocation of many small objects

2018-03-30 Thread Alexandru Jercaianu via Digitalmars-d-learn
On Friday, 30 March 2018 at 20:46:43 UTC, Per Nordlöw wrote: On Friday, 30 March 2018 at 20:38:35 UTC, rikki cattermole wrote: Use a custom allocator (that could be backed by the GC) using std.experimental.allocators :) https://dlang.org/phobos/std_experimental_allocator.html is massive. I