D Kernel Development

Jesse Robinson robgunnatkin at gmail.com
Thu Nov 12 18:02:27 PST 2009


bearophile Wrote:

> Walter Bright:
> >You'd need to avoid:
> . resizing arrays
> . associative arrays
> . closures
> . of course, any use of new
> . array concatenation<
> 
> 
> Sean Kelly:
> > Right.  I think Walter meant that "new" would use the GC for allocation, so stubbing out gc_malloc() entirely will break "new".  I suggested replacing the GC with a non-collecting allocator, something like the malloc/free-based stub in Druntime.  Using this, "new" will work but you'll have to call "delete" to release the memory.<
> 
> It can be useful to have a single compilation flag that replaces the GC with the stub, removes the larger GC from the binary, and totally disallows the usage of array resizes, array concatenations, associative arrays and closures.
> 
> Bye,
> bearophile

Such as flag would be very useful in cases like this. Basically, have a switch to turn D in a leaner language for OS / system development.




More information about the Digitalmars-d mailing list