[go-nuts] Re: discrepancy between goal heap size and NextGC

2024-01-30 Thread 'Michael Knyszek' via golang-nuts
838103616 bytes is 799 MiB (Mebibytes, the power-of-two-based prefix), which matches GC 13. (Note that the computation for the heap goal just divides by 1<<20, or 1 MiB.) The discrepancy in GC count is probably due to the fact that the GC count value reported by the GC trace is *after* the incr

[go-nuts] Re: discrepancy between goal heap size and NextGC

2024-01-30 Thread Michael Mitchell
Might it have something to do with the comment in mgc.go about how the increment of memstats.numgc differs from the increment of GC cycles for gctrace? memstats.numgc seems to get incremented earlier (after mark termination) whereas gctrace waits until the sweep is done. // cycles is the number