C++, D: Dinosaurs?
Tony
tonytech08 at gmail.com
Mon Nov 3 19:46:18 PST 2008
"Robert Fraser" <fraserofthenight at gmail.com> wrote in message
news:geo5p6$12gk$1 at digitalmars.com...
> Tony wrote:
>> (one HAS to use GC with D, right?)
>
> No. Well, the compiler generates calls to allocate & free memory, but you
> can replace those calls with whatever you want. See Tango's (druntime's)
> "stub" GC, which just reroutes compiler-generated calls to GC methods to
> malloc() and free(). You can implement your own "GC" or whatever
> management scheme you want (in fact, if you're writing, say, a device
> driver in D, you would want to use a custom allocator like this and not
> the built-in GC).
Please clarify for me the mem mgmt of D: is the garbage collector optional
or not? Just allowing me to replace "getmorecore()" or something like that
and then having the collector on top of that is unacceptable to me. I think
you may be saying that dynamic memory is in every program, which again is
not acceptable to me.
Really, memory control is a key issue when choosing a language for me
anyway. I require that level of closeness to the hardware. Anything less is
too 4GL-like for me.
Tony
More information about the Digitalmars-d
mailing list