Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 149 for Malloc (0.11 sec)

  1. src/runtime/race.go

    }
    
    //go:nosplit
    func racewriterangepc(addr unsafe.Pointer, sz, callpc, pc uintptr) {
    	gp := getg()
    	if gp != gp.m.curg {
    		// The call is coming from manual instrumentation of Go code running on g0/gsignal.
    		// Not interesting.
    		return
    	}
    	if callpc != 0 {
    		racefuncenter(callpc)
    	}
    	racewriterangepc1(uintptr(addr), sz, pc)
    	if callpc != 0 {
    		racefuncexit()
    	}
    }
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/call.go

    			pname.used = true
    			pkg := pname.imported
    
    			var exp Object
    			funcMode := value
    			if pkg.cgo {
    				// cgo special cases C.malloc: it's
    				// rewritten to _CMalloc and does not
    				// support two-result calls.
    				if sel == "malloc" {
    					sel = "_CMalloc"
    				} else {
    					funcMode = cgofunc
    				}
    				for _, prefix := range cgoPrefixes {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  3. src/go/types/call.go

    			pname.used = true
    			pkg := pname.imported
    
    			var exp Object
    			funcMode := value
    			if pkg.cgo {
    				// cgo special cases C.malloc: it's
    				// rewritten to _CMalloc and does not
    				// support two-result calls.
    				if sel == "malloc" {
    					sel = "_CMalloc"
    				} else {
    					funcMode = cgofunc
    				}
    				for _, prefix := range cgoPrefixes {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  4. src/runtime/mheap.go

    func (s spanAllocType) manual() bool {
    	return s != spanAllocHeap
    }
    
    // alloc allocates a new span of npage pages from the GC'd heap.
    //
    // spanclass indicates the span's size class and scannability.
    //
    // Returns a span that has been fully initialized. span.needzero indicates
    // whether the span has been zeroed. Note that it may not be.
    func (h *mheap) alloc(npages uintptr, spanclass spanClass) *mspan {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  5. src/testing/benchmark.go

    		return 0
    	}
    	return (float64(r.Bytes) * float64(r.N) / 1e6) / r.T.Seconds()
    }
    
    // AllocsPerOp returns the "allocs/op" metric,
    // which is calculated as r.MemAllocs / r.N.
    func (r BenchmarkResult) AllocsPerOp() int64 {
    	if v, ok := r.Extra["allocs/op"]; ok {
    		return int64(v)
    	}
    	if r.N <= 0 {
    		return 0
    	}
    	return int64(r.MemAllocs) / int64(r.N)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  6. src/runtime/mprof.go

    	// The following complex 3-stage scheme of stats accumulation
    	// is required to obtain a consistent picture of mallocs and frees
    	// for some point in time.
    	// The problem is that mallocs come in real time, while frees
    	// come only after a GC during concurrent sweeping. So if we would
    	// naively count them, we would get a skew toward mallocs.
    	//
    	// Hence, we delay information to get consistent snapshots as
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 53.3K bytes
    - Viewed (0)
  7. src/syscall/exec_linux.go

    // (Pipe is close-on-exec so if exec succeeds, it will be closed.)
    // In the child, this function must not acquire any locks, because
    // they might have been locked at the time of the fork. This means
    // no rescheduling, no malloc calls, and no new stack segments.
    // For the same reason compiler does not race instrument it.
    // The calls to RawSyscall are okay because they are assembly
    // functions that do not grow the stack.
    //
    //go:norace
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 07:45:37 UTC 2024
    - 23K bytes
    - Viewed (0)
  8. src/runtime/mgcmark.go

    	// Clear the flag indicating that this assist completed the
    	// mark phase.
    	gp.param = nil
    
    	if atomic.Load(&gcBlackenEnabled) == 0 {
    		// The gcBlackenEnabled check in malloc races with the
    		// store that clears it but an atomic check in every malloc
    		// would be a performance hit.
    		// Instead we recheck it here on the non-preemptible system
    		// stack to determine if we should perform an assist.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  9. src/runtime/mgc.go

    //
    // This may return without performing this transition in some cases,
    // such as when called on a system stack or with locks held.
    func gcStart(trigger gcTrigger) {
    	// Since this is called from malloc and malloc is called in
    	// the guts of a number of libraries that might be holding
    	// locks, don't attempt to start GC in non-preemptible or
    	// potentially unstable situations.
    	mp := acquirem()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62K bytes
    - Viewed (0)
  10. src/runtime/os_windows.go

    		for p[0] != 0 {
    			p = p[1:]
    		}
    		p = p[1:] // skip nil byte
    	}
    
    	stdcall1(_FreeEnvironmentStringsW, uintptr(strings))
    
    	// We call these all the way here, late in init, so that malloc works
    	// for the callback functions these generate.
    	var fn any = ctrlHandler
    	ctrlHandlerPC := compileCallback(*efaceOf(&fn), true)
    	stdcall2(_SetConsoleCtrlHandler, ctrlHandlerPC, 1)
    
    	monitorSuspendResume()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
Back to top