Any way to track memory allocations?

BCS ao at pathlink.com
Tue Feb 24 09:40:13 PST 2009


Reply to Jarrett,


> Hm, actually..
> 
> If you *are* using D2, you might be able to replace the GC interface
> with a "debug" interface that just forwards calls to the normal GC.
> This is a capability druntime inherited from the Tango runtime - the
> GC is separated from the rest of the standard library and can actually
> be replaced at link-time.  I don't know if D2 links all three parts of
> druntime into a single library or not, though.
> 

Someone should make such a GC shell. You could add a BanAlloc(bool) option 
that would turn on an assert on any allocation. This could be set and cleared 
around the RT parts of the code.




More information about the Digitalmars-d-learn mailing list