Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for mallocinit (0.29 sec)

  1. src/runtime/mcache.go

    	// Grab the mcache, since that's where stats live.
    	pp := mp.p.ptr()
    	var c *mcache
    	if pp == nil {
    		// We will be called without a P while bootstrapping,
    		// in which case we use mcache0, which is set in mallocinit.
    		// mcache0 is cleared when bootstrapping is complete,
    		// by procresize.
    		c = mcache0
    	} else {
    		c = pp.mcache
    	}
    	return c
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. src/runtime/malloc.go

    	// GC is not currently active.
    	assistG := deductAssistCredit(size)
    
    	// Set mp.mallocing to keep from being preempted by GC.
    	mp := acquirem()
    	if mp.mallocing != 0 {
    		throw("malloc deadlock")
    	}
    	if mp.gsignal == getg() {
    		throw("malloc during signal")
    	}
    	mp.mallocing = 1
    
    	shouldhelpgc := false
    	dataSize := userSize
    	c := getMCache(mp)
    	if c == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  3. src/runtime/proc.go

    	// In particular, it must be done before mallocinit below calls racemapshadow.
    	gp := getg()
    	if raceenabled {
    		gp.racectx, raceprocctx0 = raceinit()
    	}
    
    	sched.maxmcount = 10000
    	crashFD.Store(^uintptr(0))
    
    	// The world starts stopped.
    	worldStopped()
    
    	ticks.init() // run as early as possible
    	moduledataverify()
    	stackinit()
    	mallocinit()
    	godebug := getGodebugEarly()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  4. src/internal/abi/map.go

    	// Maximum number of key/elem pairs a bucket can hold.
    	MapBucketCountBits = 3 // log2 of number of elements in a bucket.
    	MapBucketCount     = 1 << MapBucketCountBits
    
    	// Maximum key or elem size to keep inline (instead of mallocing per element).
    	// Must fit in a uint8.
    	// Note: fast map functions cannot handle big elems (bigger than MapMaxElemBytes).
    	MapMaxKeyBytes  = 128
    	MapMaxElemBytes = 128 // Must fit in a uint8.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 20:09:01 UTC 2024
    - 719 bytes
    - Viewed (0)
  5. testing/internal-integ-testing/src/main/groovy/org/gradle/test/fixtures/server/sftp/SFTPServer.groovy

        @Override
        void resetExpectations() {
            try {
                super.resetExpectations()
            } finally {
                handleCreatedByRequest.clear()
                openingRequestIdForPath.clear()
                allowInit()
            }
        }
    
        /**
         * this basically restarts the sftpserver without
         * registering a password authentication
         * */
        def withPasswordAuthenticationDisabled() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  6. src/runtime/arena.go

    	// arena).
    	deductAssistCredit(userArenaChunkBytes)
    
    	// Set mp.mallocing to keep from being preempted by GC.
    	mp := acquirem()
    	if mp.mallocing != 0 {
    		throw("malloc deadlock")
    	}
    	if mp.gsignal == getg() {
    		throw("malloc during signal")
    	}
    	mp.mallocing = 1
    
    	// Allocate a new user arena.
    	var span *mspan
    	systemstack(func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  7. src/runtime/panic.go

    		throw(msg)
    	}
    	// TODO: is this redundant? How could we be in malloc
    	// but not in the runtime? runtime/internal/*, maybe?
    	gp := getg()
    	if gp != nil && gp.m != nil && gp.m.mallocing != 0 {
    		throw(msg)
    	}
    }
    
    // Same as above, but calling from the runtime is allowed.
    //
    // Using this function is necessary for any panic that may be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  8. src/runtime/cgocheck.go

    	gp := getg()
    	if gp == gp.m.g0 || gp == gp.m.gsignal {
    		return
    	}
    
    	// Allocating memory can write to various mfixalloc structs
    	// that look like they are non-Go memory.
    	if gp.m.mallocing != 0 {
    		return
    	}
    
    	// If the object is pinned, it's safe to store it in C memory. The GC
    	// ensures it will not be moved or freed.
    	if isPinned(src) {
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. src/runtime/export_test.go

    	stw := stopTheWorld(stwForTestReadMemStatsSlow)
    
    	// Run on the system stack to avoid stack growth allocation.
    	systemstack(func() {
    		// Make sure stats don't change.
    		getg().m.mallocing++
    
    		readmemstats_m(&base)
    
    		// Initialize slow from base and zero the fields we're
    		// recomputing.
    		slow = base
    		slow.Alloc = 0
    		slow.TotalAlloc = 0
    		slow.Mallocs = 0
    		slow.Frees = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  10. src/runtime/iface.go

    // itabLock must be held.
    func itabAdd(m *itab) {
    	// Bugs can lead to calling this while mallocing is set,
    	// typically because this is called while panicking.
    	// Crash reliably, rather than only when we need to grow
    	// the hash table.
    	if getg().m.mallocing != 0 {
    		throw("malloc deadlock")
    	}
    
    	t := itabTable
    	if t.count >= 3*(t.size/4) { // 75% load factor
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top