Re: stub out your gc without hacking on druntime

2016-06-29 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 30 June 2016 at 04:07:03 UTC, Hiemlick Hiemlicker wrote: Can one use this to hook in to any phobo's lib functions? Yeah, you could. Easier though is to just copy the phobos lib file, modify it, then compile it into your program explicitly: cp dmd2/src/phobos/std/file.d . # edit

Re: stub out your gc without hacking on druntime

2016-06-29 Thread Hiemlick Hiemlicker via Digitalmars-d
On Tuesday, 11 June 2013 at 12:13:05 UTC, Adam D. Ruppe wrote: On Tuesday, 11 June 2013 at 03:08:36 UTC, H. S. Teoh wrote: [...] Yea, that's the idea here. Like Simen said, if these were errors, your program wouldn't even start, so noop is better. Though gc_init should call thread_init, whic

Re: stub out your gc without hacking on druntime

2013-06-11 Thread Adam D. Ruppe
On Tuesday, 11 June 2013 at 03:08:36 UTC, H. S. Teoh wrote: Or is this just a quick-n-dirty way to get a no-GC environment without needing hack druntime? Yea, that's the idea here. Like Simen said, if these were errors, your program wouldn't even start, so noop is better. Though gc_init shoul

Re: stub out your gc without hacking on druntime

2013-06-11 Thread Simen Kjaeraas
On Tue, 11 Jun 2013 05:06:53 +0200, H. S. Teoh wrote: void gc_init() { } void gc_addRange() { } void gc_term() { } Should these return errors too? Or is this just a quick-n-dirty way to get a no-GC environment without needing hack druntime? They should not return errors. Basically, these

Re: stub out your gc without hacking on druntime

2013-06-10 Thread H. S. Teoh
On Mon, Jun 10, 2013 at 09:16:04PM +0200, Adam D. Ruppe wrote: > I decided to boil going without gc down to one simple move: put this > code into a file called nogc.d and then add it to your dmd command > line: > > === > > import core.stdc.stdio; > import core.stdc.stdlib; > > extern(C): > > vo

stub out your gc without hacking on druntime

2013-06-10 Thread Adam D. Ruppe
I decided to boil going without gc down to one simple move: put this code into a file called nogc.d and then add it to your dmd command line: === import core.stdc.stdio; import core.stdc.stdlib; extern(C): void* gc_malloc() { fprintf(stderr, "GC allocations are disabled\nProgram ter