X-Git-Url: https://git.llucax.com/software/dgc/cdgc.git/blobdiff_plain/7e73b6245c0d7f6af8da2228a2fdbc9404ad69ec..39229a694674a24ad2d3b9203f591198b7c60ca7:/rt/gc/cdgc/stats.d diff --git a/rt/gc/cdgc/stats.d b/rt/gc/cdgc/stats.d index 562d955..073a594 100644 --- a/rt/gc/cdgc/stats.d +++ b/rt/gc/cdgc/stats.d @@ -202,12 +202,12 @@ private: if (bin < .gc.B_PAGE) { size_t size = .gc.binsize[bin]; - size_t bitstride = size / 16; - size_t bitbase = pn * (.gc.PAGESIZE / 16); - size_t bittop = bitbase + (.gc.PAGESIZE / 16); - for (auto biti = bitbase; biti < bittop; biti += bitstride) + size_t attrstride = size / 16; + size_t attrbase = pn * (.gc.PAGESIZE / 16); + size_t attrtop = attrbase + (.gc.PAGESIZE / 16); + for (auto attri = attrbase; attri < attrtop; attri += attrstride) { - if (pool.freebits.test(biti)) + if (pool.freebits.test(attri)) mem_info.free += size; else mem_info.used += size; // TODO: wasted