digitalmars.D - GC-free techniques for a wiki page - Was: Smart pointers instead of
- Andrej Mitrovic (3/10) Feb 01 2014 It looks like this post was missed, and instead people started
- Mike (7/20) Feb 01 2014 I found this page quite useful (http://dlang.org/memory.html),
- Peter Alexander (5/26) Feb 02 2014 I wrote this a while back:
- Gopan (3/3) Feb 03 2014 Is it possible to switch off GC during compilation so that I will
- Dicebot (4/7) Feb 03 2014 No, right now only run-time asserts are possible. You may want to
- Marco Leise (19/22) Feb 03 2014 I would think that parts of druntime/Phobos make use of the GC
On 1/31/14, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:Bumping old thread: There is an ever-increasing amount of newcomers in #d on IRC who end up asking how to avoid the GC or at least to be able to determine where implicit allocations happen. I think we should work on creating a wiki page and gather as much advice as possible on dealing with the GC, implicit allocations, real-time constraints, etc.It looks like this post was missed, and instead people started replying to messages from over a year ago. :)
Feb 01 2014
On Saturday, 1 February 2014 at 20:26:51 UTC, Andrej Mitrovic wrote:On 1/31/14, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:I found this page quite useful (http://dlang.org/memory.html), but I acknowledge it's probably not enough. I've only been here a short time, but I'm beginning to see that things with "we should" likely won't every happen until they are replaced with "I should".Bumping old thread: There is an ever-increasing amount of newcomers in #d on IRC who end up asking how to avoid the GC or at least to be able to determine where implicit allocations happen. I think we should work on creating a wiki page and gather as much advice as possible on dealing with the GC, implicit allocations, real-time constraints, etc.It looks like this post was missed, and instead people started replying to messages from over a year ago. :)
Feb 01 2014
On Sunday, 2 February 2014 at 05:30:12 UTC, Mike wrote:On Saturday, 1 February 2014 at 20:26:51 UTC, Andrej Mitrovic wrote:I wrote this a while back: http://poita.org/2012/12/15/using-d-without-the-gc.html It doesn't cover everything though, and I think the static array initialisation allocation is now out-of-date.On 1/31/14, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:I found this page quite useful (http://dlang.org/memory.html), but I acknowledge it's probably not enough. I've only been here a short time, but I'm beginning to see that things with "we should" likely won't every happen until they are replaced with "I should".Bumping old thread: There is an ever-increasing amount of newcomers in #d on IRC who end up asking how to avoid the GC or at least to be able to determine where implicit allocations happen. I think we should work on creating a wiki page and gather as much advice as possible on dealing with the GC, implicit allocations, real-time constraints, etc.It looks like this post was missed, and instead people started replying to messages from over a year ago. :)
Feb 02 2014
Is it possible to switch off GC during compilation so that I will get compilation error on every statement that invites GC in?
Feb 03 2014
On Monday, 3 February 2014 at 12:22:48 UTC, Gopan wrote:Is it possible to switch off GC during compilation so that I will get compilation error on every statement that invites GC in?No, right now only run-time asserts are possible. You may want to wait for https://github.com/D-Programming-Language/dmd/pull/1886 to be merged.
Feb 03 2014
Am Mon, 03 Feb 2014 12:22:47 +0000 schrieb "Gopan" <gopakumar.gg gmail.com>:Is it possible to switch off GC during compilation so that I will get compilation error on every statement that invites GC in?I would think that parts of druntime/Phobos make use of the GC at program startup already. And in general any module not on the compiler command-line when using that switch and with only a .di file cannot be statically checked. Even lazy initialization using the GC would not work: private Foo foo; property Foo someThreadLocalFoo() { if (foo is null) foo = new Foo; // <- error return foo; } If you compile that module alone or as part of a library, the compiler has to assume that some other module will eventually make use of this function. -- Marco
Feb 03 2014