Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for Malloc (0.13 sec)

  1. src/runtime/malloc.go

    			minSizeForMallocHeaderIsSizeClass = true
    			break
    		}
    	}
    	if !minSizeForMallocHeaderIsSizeClass {
    		throw("min size of malloc header is not a size class boundary")
    	}
    	// Check that the pointer bitmap for all small sizes without a malloc header
    	// fits in a word.
    	if minSizeForMallocHeader/goarch.PtrSize > 8*goarch.PtrSize {
    		throw("max pointer/scan bitmap size for headerless objects is too large")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  2. src/runtime/mbitmap.go

    	"runtime/internal/sys"
    	"unsafe"
    )
    
    const (
    	// A malloc header is functionally a single type pointer, but
    	// we need to use 8 here to ensure 8-byte alignment of allocations
    	// on 32-bit platforms. It's wasteful, but a lot of code relies on
    	// 8-byte alignment for 8-byte atomics.
    	mallocHeaderSize = 8
    
    	// The minimum object size that has a malloc header, exclusive.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/cmd/cgo/gcc.go

    			"-Wno-unknown-warning-option",
    			"-Wno-unneeded-internal-declaration",
    			"-Wno-unused-function",
    			"-Qunused-arguments",
    			// Clang embeds prototypes for some builtin functions,
    			// like malloc and calloc, but all size_t parameters are
    			// incorrectly typed unsigned long. We work around that
    			// by disabling the builtin functions (this is safe as
    			// it won't affect the actual compilation of the C code).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
  8. src/time/time_test.go

    func TestCountMallocs(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping malloc count in short mode")
    	}
    	if runtime.GOMAXPROCS(0) > 1 {
    		t.Skip("skipping; GOMAXPROCS>1")
    	}
    	for _, mt := range mallocTest {
    		allocs := int(testing.AllocsPerRun(100, mt.fn))
    		if allocs > mt.count {
    			t.Errorf("%s: %d allocs, want %d", mt.desc, allocs, mt.count)
    		}
    	}
    }
    
    func TestLoadFixed(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  9. src/cmd/go/internal/test/test.go

    The following flags are also recognized by 'go test' and can be used to
    profile the tests during execution:
    
    	-benchmem
    	    Print memory allocation statistics for benchmarks.
    	    Allocations made in C or using C.malloc are not counted.
    
    	-blockprofile block.out
    	    Write a goroutine blocking profile to the specified file
    	    when all tests are complete.
    	    Writes test binary as -c would.
    
    	-blockprofilerate n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

        return GetInverseScalesConstantOp().getValue();
      }
    
      func::CallOp GetCallOp() { return call_op_; }
    
      FlatSymbolRefAttr GetFunction() { return call_op_.getCalleeAttr(); }
    
     private:
      explicit UniformQuantizeFunctionCallPattern(func::CallOp call_op)
          : call_op_(call_op) {}
    
      func::CallOp call_op_;
    };
    
    // Matches the following pattern that represents uniform dequantization.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
Back to top