Skip to content
  • Simon Marlow's avatar
    More accurate allocation stats for :set +s · cf7573b8
    Simon Marlow authored
    The point of this commit is to make the memory allocation statistic
    from :set +s in GHCi a lot more accurate.  Currently it uses the total
    allocation figure calculated by the RTS, which is only updated during
    GC, so can be wrong by an arbitrary amount.  The fix is to the the
    per-thread allocation counter that was introduced for allocation
    limits.
    
    This required changes to the GHC API, because we now have to return
    the allocation value from each evaluation.  Rather than just change
    the API, I introduced a new API and deprecated the old one.  The new
    one is simpler and more extensible, so hopefully we won't need to make
    this transition in the future.  See GHC.hs for details.
    cf7573b8