[Issue 2586] broken import gcstats

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 16 09:23:08 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2586


sean at invisibleduck.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugzilla at digitalmars.com    |sean at invisibleduck.org




------- Comment #2 from sean at invisibleduck.org  2009-01-16 11:23 -------
Since that module isn't in the import directory, it should be clear that it's
not intended to be externally visible.  GC stats have yet to be formally
defined in druntime, so there is no public interface for accessing them.  You
can obtain them manually via:

struct GCStats
{
    size_t poolsize;        // total size of pool
    size_t usedsize;        // bytes allocated
    size_t freeblocks;      // number of blocks marked FREE
    size_t freelistsize;    // total of memory on free lists
    size_t pageblocks;      // number of blocks marked PAGE
}
extern (C) GCStats gc_stats();
auto s = gc_stats();

But be aware that the structure of GCStats may change.


-- 



More information about the Digitalmars-d-bugs mailing list