Lines Matching defs:mheap
61 type mheap struct { struct
62 _ sys.NotInHeap
66 lock mutex
68 pages pageAlloc // page allocation data structure
70 sweepgen uint32 // sweep generation, see comment in mspan; written during STW
83 allspans []*mspan // all spans out there
103 pagesInUse atomic.Uintptr // pages of spans in stats mSpanInUse
104 pagesSwept atomic.Uint64 // pages swept this cycle
105 pagesSweptBasis atomic.Uint64 // pagesSwept to use as the origin of the sweep ratio
106 …value of gcController.heapLive to use as the origin of sweep ratio; written with lock, read without
107 sweepPagesPerByte float64 // proportional sweep ratio; written with lock, read without
117 reclaimIndex atomic.Uint64
123 reclaimCredit atomic.Uintptr
125 _ cpu.CacheLinePad // prevents false-sharing between arenas and preceding variables
147 arenas [1 << arenaL1Bits]*[1 << arenaL2Bits]*heapArena
151 arenasHugePages bool
156 heapArenaAlloc linearAlloc
162 arenaHints *arenaHint
166 arena linearAlloc
175 allArenas []arenaIdx
180 sweepArenas []arenaIdx
186 markArenas []arenaIdx
190 curArena struct {
199 central [numSpanClasses]struct {
204 spanalloc fixalloc // allocator for span*
205 cachealloc fixalloc // allocator for mcache*
206 specialfinalizeralloc fixalloc // allocator for specialfinalizer*
207 specialprofilealloc fixalloc // allocator for specialprofile*
208 specialReachableAlloc fixalloc // allocator for specialReachable
209 specialPinCounterAlloc fixalloc // allocator for specialPinCounter
210 specialWeakHandleAlloc fixalloc // allocator for specialWeakHandle
211 speciallock mutex // lock for special record allocators.
212 arenaHintAlloc fixalloc // allocator for arenaHints
217 userArena struct {
233 unused *specialfinalizer // never set, just here to force the specialfinalizer type into DWARF
739 func (h *mheap) init() {
776 func (h *mheap) reclaim(npage uintptr) {
856 func (h *mheap) reclaimChunk(arenas []arenaIdx, pageIdx, n uintptr) uintptr {
951 func (h *mheap) alloc(npages uintptr, spanclass spanClass) *mspan {
984 func (h *mheap) allocManual(npages uintptr, typ spanAllocType) *mspan {
993 func (h *mheap) setSpans(base, npage uintptr, s *mspan) {
1017 func (h *mheap) allocNeedsZero(base, npage uintptr) (needZero bool) {
1082 func (h *mheap) tryAllocMSpan() *mspan {
1105 func (h *mheap) allocMSpanLocked() *mspan {
1137 func (h *mheap) freeMSpanLocked(s *mspan) {
1169 func (h *mheap) allocSpan(npages uintptr, typ spanAllocType, spanclass spanClass) (s *mspan) {
1382 func (h *mheap) initSpan(s *mspan, typ spanAllocType, spanclass spanClass, base, npages uintptr) {
1470 func (h *mheap) grow(npage uintptr) (uintptr, bool) {
1555 func (h *mheap) freeSpan(s *mspan) {
1595 func (h *mheap) freeManual(s *mspan, typ spanAllocType) {
1611 func (h *mheap) freeSpanLocked(s *mspan, typ spanAllocType) {
1673 func (h *mheap) scavengeAll() {