Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 553 for mheap (0.05 sec)

  1. src/runtime/mheap.go

    	// OpenBSD.
    	physPageAlignedStacks = GOOS == "openbsd"
    )
    
    // Main malloc heap.
    // The heap itself is the "free" and "scav" treaps,
    // but all the other global data is here too.
    //
    // mheap must not be heap-allocated because it contains mSpanLists,
    // which must not be heap-allocated.
    type mheap struct {
    	_ sys.NotInHeap
    
    	// lock must only be acquired on the system stack, otherwise a g
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  2. src/runtime/mklockrank.go

    stackLarge,
      stackpool,
      wbufSpans
    # Above mheap is anything that can call the span allocator.
    < mheap;
    # Below mheap is the span allocator implementation.
    #
    # Specials: we're allowed to allocate a special while holding
    # an mspanSpecial lock, and they're part of the malloc implementation.
    # Pinner bits might be freed by the span allocator.
    mheap, mspanSpecial < mheapSpecial;
    mheap, mheapSpecial < globalAlloc;
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  3. test/fixedbugs/issue5963.go

    }
    
    func main() {
    }
    
    /* Before fix:
    
    invalid m->locked = 2
    fatal error: internal lockOSThread error
    
    goroutine 2 [runnable]:
    runtime.MHeap_Scavenger()
    	/Users/rsc/g/go/src/pkg/runtime/mheap.c:438
    runtime.goexit()
    	/Users/rsc/g/go/src/pkg/runtime/proc.c:1313
    created by runtime.main
    	/Users/rsc/g/go/src/pkg/runtime/proc.c:165
    
    goroutine 3 [runnable]:
    main.funcĀ·002()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 929 bytes
    - Viewed (0)
  4. src/runtime/mgcsweep.go

    				releasedEager := mheap_.pages.scav.releasedEager.Load()
    
    				// Print the line.
    				printScavTrace(releasedBg, releasedEager, false)
    
    				// Update the stats.
    				mheap_.pages.scav.releasedBg.Add(-releasedBg)
    				mheap_.pages.scav.releasedEager.Add(-releasedEager)
    				unlock(&mheap_.lock)
    			})
    		}
    		scavenger.ready()
    	}
    
    	gp.m.locks--
    	return npages
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:52:18 UTC 2024
    - 32.9K bytes
    - Viewed (0)
  5. src/runtime/malloc.go

    			a, size := sysReserveAligned(unsafe.Pointer(p), arenaSize, heapArenaBytes)
    			if a != nil {
    				mheap_.arena.init(uintptr(a), size, false)
    				p = mheap_.arena.end // For hint below
    				break
    			}
    		}
    		hint := (*arenaHint)(mheap_.arenaHintAlloc.alloc())
    		hint.addr = p
    		hint.next, mheap_.arenaHints = mheap_.arenaHints, hint
    
    		// Place the hint for user arenas just after the large reservation.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  6. src/runtime/mcentral.go

    			c.fullSwept(sg).push(s)
    		}
    	}
    }
    
    // grow allocates a new empty span from the heap and initializes it for c's size class.
    func (c *mcentral) grow() *mspan {
    	npages := uintptr(class_to_allocnpages[c.spanclass.sizeclass()])
    	size := uintptr(class_to_size[c.spanclass.sizeclass()])
    
    	s := mheap_.alloc(npages, c.spanclass)
    	if s == nil {
    		return nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  7. src/runtime/arena.go

    // Each chunk must be a multiple of the heap arena size, or the heap arena size must
    // be divisible by the arena chunks. The address space for each chunk, and each
    // corresponding heapArena for that address space, are eternally reserved for use as
    // arena chunks. That is, they can never be used for the general heap. Each chunk
    // is also represented by a single mspan, and is modeled as a single large heap
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  8. src/runtime/lockrank.go

    	lockRankGscan:           "gscan",
    	lockRankStackpool:       "stackpool",
    	lockRankStackLarge:      "stackLarge",
    	lockRankHchanLeaf:       "hchanLeaf",
    	lockRankWbufSpans:       "wbufSpans",
    	lockRankMheap:           "mheap",
    	lockRankMheapSpecial:    "mheapSpecial",
    	lockRankGlobalAlloc:     "globalAlloc",
    	lockRankTrace:           "trace",
    	lockRankTraceStackTab:   "traceStackTab",
    	lockRankPanic:           "panic",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  9. src/runtime/mpagealloc.go

    // time, but may take time proportional to the size of the mapped heap beyond that.
    //
    // The heap lock must not be held over this operation, since it will briefly acquire
    // the heap lock.
    //
    // Must be called on the system stack because it acquires the heap lock.
    //
    //go:systemstack
    func (p *pageAlloc) enableChunkHugePages() {
    	// Grab the heap lock to turn on huge pages for new chunks and clone the current
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  10. src/runtime/malloc_test.go

    		t.FailNow()
    	}
    }
    
    type acLink struct {
    	x [1 << 20]byte
    }
    
    var arenaCollisionSink []*acLink
    
    func TestArenaCollision(t *testing.T) {
    	testenv.MustHaveExec(t)
    
    	// Test that mheap.sysAlloc handles collisions with other
    	// memory mappings.
    	if os.Getenv("TEST_ARENA_COLLISION") != "1" {
    		cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestArenaCollision$", "-test.v"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top