(memStats *runtime.MemStats)
| 1158 | } |
| 1159 | |
| 1160 | func setCurMemoryUsedWith(memStats *runtime.MemStats) uint64 { |
| 1161 | // (Sys - HeapIdle) best represents the amount of memory that the go process |
| 1162 | // is consuming at the moment that is not reusable; the go process has |
| 1163 | // as idle memory component that it holds on to which can be reused; |
| 1164 | // HeapIdle includes memory that is idle and the part that has been released. |
| 1165 | curMemoryUsed := memStats.Sys - memStats.HeapIdle |
| 1166 | atomic.StoreUint64(¤tMemoryUsed, curMemoryUsed) |
| 1167 | return curMemoryUsed |
| 1168 | } |
| 1169 | |
| 1170 | func RunRecentInfoCache(mgr *cbgt.Manager) { |
| 1171 | cfg := mgr.Cfg() |
no outgoing calls
no test coverage detected