Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for Malloc (0.2 sec)

  1. src/runtime/mgcscavenge.go

    // the allocation is part of a bigger one and it's probably not worth
    // eagerly collapsing).
    //
    // alloc may only run concurrently with find.
    func (s *scavengeIndex) alloc(ci chunkIdx, npages uint) {
    	sc := s.chunks[ci].load()
    	sc.alloc(npages, s.gen)
    	// TODO(mknyszek): Consider eagerly backing memory with huge pages
    	// here and track whether we believe this chunk is backed by huge pages.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:48:45 UTC 2024
    - 52.3K bytes
    - Viewed (0)
  2. src/net/netip/netip_test.go

    				// Optimizations are required to remove some allocs.
    				t.Skipf("skipping on %v", testenv.Builder())
    			}
    			allocs := int(testing.AllocsPerRun(1000, func() {
    				sinkString = tc.ip.String()
    			}))
    			if allocs != tc.wantAllocs {
    				t.Errorf("allocs=%d, want %d", allocs, tc.wantAllocs)
    			}
    		})
    	}
    }
    
    func TestPrefixString(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 54.3K bytes
    - Viewed (0)
  3. src/bytes/bytes_test.go

    func TestEqual(t *testing.T) {
    	// Run the tests and check for allocation at the same time.
    	allocs := testing.AllocsPerRun(10, func() {
    		for _, tt := range compareTests {
    			eql := Equal(tt.a, tt.b)
    			if eql != (tt.i == 0) {
    				t.Errorf(`Equal(%q, %q) = %v`, tt.a, tt.b, eql)
    			}
    		}
    	})
    	if allocs > 0 {
    		t.Errorf("Equal allocated %v times", allocs)
    	}
    }
    
    func TestEqualExhaustive(t *testing.T) {
    	var size = 128
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

        return "main";
      }
      if (subgraph.name.empty()) {
        return llvm::formatv("fn_{0}", index).str();
      }
      return subgraph.name;
    }
    
    // Adds a CallOp in `region` to call the `func` and returns the results of
    // CallOp.
    void AddCallOpInWhileOpRegion(mlir::Region& region, mlir::func::FuncOp func) {
      OpBuilder op_builder{region};
      region.push_back(new mlir::Block());
      Location loc = region.getLoc();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/windows/security_windows.go

    	// Go-allocated one, make sure that the Go allocation is aligned to the
    	// pointer size.
    	const psize = int(unsafe.Sizeof(uintptr(0)))
    	alloc := make([]uintptr, (sdLen+psize-1)/psize)
    	dst := unsafe.Slice((*byte)(unsafe.Pointer(&alloc[0])), sdLen)
    	copy(dst, src)
    	return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  6. src/strings/strings_test.go

    		}
    	}
    
    	haystack := "test世界"
    	allocs := testing.AllocsPerRun(1000, func() {
    		if i := IndexRune(haystack, 's'); i != 2 {
    			t.Fatalf("'s' at %d; want 2", i)
    		}
    		if i := IndexRune(haystack, '世'); i != 4 {
    			t.Fatalf("'世' at %d; want 4", i)
    		}
    	})
    	if allocs != 0 && testing.CoverMode() == "" {
    		t.Errorf("expected no allocations, got %f", allocs)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 53K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/quantize_composite_functions.mlir

        return %2 : tensor<1x3xf32>
      }
    // Checks that the quantized XlaCallModule has been replaced by a CallOp, which
    // calls the quantized entry function.
    
    // CHECK: func.func private @quantize_dot_general_fn(%[[ARG_0:.+]]: tensor<1x2xf32>) -> tensor<1x3xf32> attributes {tf._original_func_name = "main_0"}
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 91.6K bytes
    - Viewed (0)
  8. src/os/os_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	defer f.Close()
    	allocs := testing.AllocsPerRun(100, func() {
    		f.WriteString("I will not allocate when passed a string longer than 32 bytes.\n")
    	})
    	if allocs != 0 {
    		t.Errorf("expected 0 allocs for File.WriteString, got %v", allocs)
    	}
    }
    
    // Test that it's OK to have parallel I/O and Close on a pipe.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  9. cmd/xl-storage-format-v2.go

    func metaDataPoolPut(buf []byte) {
    	if cap(buf) >= metaDataReadDefault && cap(buf) < metaDataReadDefault*4 {
    		//nolint:staticcheck // SA6002 we are fine with the tiny alloc
    		metaDataPool.Put(buf)
    	}
    }
    
    // readXLMetaNoData will load the metadata, but skip data segments.
    // This should only be used when data is never interesting.
    // If data is not xlv2, it is returned in full.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 29 19:14:09 UTC 2024
    - 63.6K bytes
    - Viewed (0)
  10. cmd/erasure-server-pool.go

    			// it will fail anyways, however if there is quorum available
    			// with enough disks online but sufficiently inconsistent to
    			// break parity threshold, allow them to be overwritten
    			// or allow new versions to be added.
    
    			return pinfo, z.poolsWithObject(poolObjInfos, opts), nil
    		}
    		defPool = pinfo
    		if !isErrObjectNotFound(pinfo.Err) {
    			return pinfo, noReadQuorumPools, pinfo.Err
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 11:58:12 UTC 2024
    - 82.5K bytes
    - Viewed (0)
Back to top