GC implementation

Frank Benoit frank at nix.de
Fri Mar 17 17:51:04 PST 2006


As far as I see, the D garbage collector is a conservative
implementation. Is that correct?

Conservative gc means, the gc does not know where the pointers are
located. Every 4-byte word is interpreted as potential pointer. If the
value is in the address range of the gc heap, it can prevent objects or
complete trees from being freed.

This is no problem for most application. But isn't this a show stopper
for secure applications, like server processes?

How to prevent hacks? If someone for magic knows critical adresses and
supplies them in input values (data fields), he can force the
application to go down, running out of memory.

Frank



More information about the Digitalmars-d mailing list