MCPcopy Create free account
hub / github.com/couchbase/cbft / setCurMemoryUsedWith

Function setCurMemoryUsedWith

ns_server.go:1160–1168  ·  view source on GitHub ↗
(memStats *runtime.MemStats)

Source from the content-addressed store, hash-verified

1158}
1159
1160func 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(&currentMemoryUsed, curMemoryUsed)
1167 return curMemoryUsed
1168}
1169
1170func RunRecentInfoCache(mgr *cbgt.Manager) {
1171 cfg := mgr.Cfg()

Callers 2

UpdateCurMemoryUsedFunction · 0.85
RunRecentInfoCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected