The describe 'release the physical memory' may not be rigorous. Because gc 
remand the span,obj, or big obj to heap or central area, may not release 
the physical memory.
"When the next GC starts, it sweeps all not-yet-swept spans (if any)."
maybe it is the sweeps termination phrase mean.
BTW, I look the doc and look up three time of stw.
sweep termination 

GC performs the mark phase. No objects may be

//    scanned until all Ps have enabled the write barrier, which is
//    accomplished using STW.

mark termination phases. 
or "write barrier" accomplished during sweep termination?  
在 2019年6月21日星期五 UTC+8上午8:54:31,Ian Lance Taylor写道:
>
> On Thu, Jun 20, 2019 at 9:56 AM Chou Yan <yan.ch...@gmail.com 
> <javascript:>> wrote: 
> > 
> > I look up the doc for gctrace: 
> > https://godoc.org/runtime 
> > it show us: 
> > 
> > Currently, it is: 
> > gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # 
> P 
> > where the fields are as follows: 
> > gc #        the GC number, incremented at each GC 
> > @#s         time in seconds since program start 
> > #%          percentage of time spent in GC since program start 
> > #+...+#     wall-clock/CPU times for the phases of the GC 
> > #->#-># MB  heap size at GC start, at GC end, and live heap 
> > # MB goal   goal heap size 
> > # P         number of processors used 
> > The phases are stop-the-world (STW) sweep termination, concurrent 
> > mark and scan, and STW mark termination. The CPU times 
> > for mark/scan are broken down in to assist time (GC performed in 
> > line with allocation), background GC time, and idle GC time. 
> > If the line ends with "(forced)", this GC was forced by a 
> > runtime.GC() call. 
> > 
> > 
> > I am very confused. Will it be swt in the cleanup phase? 
>
> I'm sorry, I don't understand what you are asking.  What is the cleanup 
> phase? 
>
> > And how many times gc stw? mark start? concurrent mark? remark ? or 
> sweep ? 
>
> See the long comment near the top of runtime/mgc.go.  Currently each 
> cycle stops the world twice, very briefly, in the sweep termination 
> and mark termination phases. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/7b0bedb9-3450-4502-bfa3-c290be1b51f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to