www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Disabling GC

reply Vladimir <kv11111 mail.ru> writes:
Hello All !
Does someone tried to use D without GC ? Do I need to recompile phobos to
disable GC ?
And does some language features such as dynamic arrays and AA rely on GC ?

-- 
          Vladimir
Apr 20 2005
parent reply Paul Bonser <misterpib gmail.com> writes:
Vladimir wrote:
 Hello All !
 Does someone tried to use D without GC ? Do I need to recompile phobos to
 disable GC ?
 And does some language features such as dynamic arrays and AA rely on GC ?
 
import std.gc; ... disable(); // or std.gc.disable(); // if you have something named disable already... ... Don't know about the Dynamic array and AA stuff...I'd like to know myself... -- -PIB -- "C++ also supports the notion of *friends*: cooperative classes that are permitted to see each other's private parts." - Grady Booch
Apr 20 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Paul Bonser wrote:

 Does someone tried to use D without GC ? Do I need to recompile phobos to
 disable GC ?
 std.gc.disable(); // if you have something named disable already...
 ...
I don't think enabling/disabling is implemented yet in Phobos ? But I do know that it is possible to recompile it, without GC. --anders
Apr 20 2005
parent reply Georg Wrede <georg.wrede nospam.org> writes:
Anders F Björklund wrote:
 Paul Bonser wrote:
 
 Does someone tried to use D without GC ? Do I need to recompile 
 phobos to
 disable GC ?
 std.gc.disable(); // if you have something named disable already...
 ...
I don't think enabling/disabling is implemented yet in Phobos ? But I do know that it is possible to recompile it, without GC.
I haven't looked at it, but I assume that with some tweaking anybody could do it. What would be nice, is to have a disableGC.txt in the Phobos directory, explaining how to do it. (It should actually be in the GC documentation, but, hey, one can't expect to get all the money in the world. :-) )
Apr 20 2005
parent reply "Charlie" <charles jwavro.com> writes:
Just do an extern (C): main , and dont call gc_init();

Charlie
"Georg Wrede" <georg.wrede nospam.org> wrote in message
news:4266768A.4040905 nospam.org...
 Anders F Björklund wrote:
 Paul Bonser wrote:

 Does someone tried to use D without GC ? Do I need to recompile
 phobos to
 disable GC ?
 std.gc.disable(); // if you have something named disable already...
 ...
I don't think enabling/disabling is implemented yet in Phobos ? But I do know that it is possible to recompile it, without GC.
I haven't looked at it, but I assume that with some tweaking anybody could do it. What would be nice, is to have a disableGC.txt in the Phobos directory, explaining how to do it. (It should actually be in the GC documentation, but, hey, one can't expect to get all the money in the world. :-) )
Apr 24 2005
parent Vladimir <kv11111 mail.ru> writes:
Charlie wrote:
 Just do an extern (C): main , and dont call gc_init();
Thanks !
 
 Charlie
 "Georg Wrede" <georg.wrede nospam.org> wrote in message
 news:4266768A.4040905 nospam.org...
 Anders F Björklund wrote:
 Paul Bonser wrote:

 Does someone tried to use D without GC ? Do I need to recompile
 phobos to
 disable GC ?
 std.gc.disable(); // if you have something named disable already...
 ...
I don't think enabling/disabling is implemented yet in Phobos ? But I do know that it is possible to recompile it, without GC.
I haven't looked at it, but I assume that with some tweaking anybody could do it. What would be nice, is to have a disableGC.txt in the Phobos directory, explaining how to do it. (It should actually be in the GC documentation, but, hey, one can't expect to get all the money in the world. :-) )
-- Vladimir
Apr 25 2005