Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 116 for relocs (0.13 sec)

  1. src/runtime/string_test.go

    		}
    	})
    	if n != 0 {
    		t.Fatalf("want 0 allocs, got %v", n)
    	}
    }
    
    func TestStringIndexHaystack(t *testing.T) {
    	// See issue 25864.
    	haystack := []byte("hello")
    	needle := "ll"
    	n := testing.AllocsPerRun(1000, func() {
    		if strings.Index(string(haystack), needle) != 2 {
    			t.Fatalf("needle not found")
    		}
    	})
    	if n != 0 {
    		t.Fatalf("want 0 allocs, got %v", n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 13 14:05:23 UTC 2022
    - 13.3K bytes
    - Viewed (0)
  2. src/mdo/model.vm

                Map<Object, InputLocation> newlocs = this.locations != null ? this.locations : Collections.emptyMap();
                Map<Object, InputLocation> oldlocs = this.base != null && this.base.locations != null ? this.base.locations : Collections.emptyMap();
                Map<Object, InputLocation> locations = new HashMap<>();
                locations.put("", newlocs.containsKey("") ? newlocs.get("") : oldlocs.get(""));
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Feb 07 21:28:01 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. src/runtime/metrics_test.go

    			}
    			if gotFree != objects.frees {
    				t.Errorf("object distribution counts don't match total allocs: got %d, want %d", gotFree, objects.frees)
    			}
    		}
    	}
    	// The current GC has at least 2 pauses per GC.
    	// Check to see if that value makes sense.
    	if gc.pauses < gc.numGC*2 {
    		t.Errorf("fewer pauses than expected: got %d, want at least %d", gc.pauses, gc.numGC*2)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  4. src/net/tcpsock_test.go

    		t.Fatal(err)
    	}
    	defer server.Close()
    
    	var buf [128]byte
    	allocs := testing.AllocsPerRun(1000, func() {
    		_, err := server.Write(buf[:])
    		if err != nil {
    			t.Fatal(err)
    		}
    		_, err = io.ReadFull(client, buf[:])
    		if err != nil {
    			t.Fatal(err)
    		}
    	})
    	if allocs > 0 {
    		t.Fatalf("got %v; want 0", allocs)
    	}
    
    	var bufwrt [128]byte
    	ch := make(chan bool)
    	defer close(ch)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  5. src/net/udpsock_test.go

    			t.Fatal(err)
    		}
    	})
    	if got := int(allocs); got != 0 {
    		t.Errorf("WriteToUDPAddrPort/ReadFromUDPAddrPort allocated %d objects", got)
    	}
    
    	allocs = testing.AllocsPerRun(1000, func() {
    		_, err := conn.WriteTo(buf, addr)
    		if err != nil {
    			t.Fatal(err)
    		}
    		_, _, err = conn.ReadFromUDP(buf)
    		if err != nil {
    			t.Fatal(err)
    		}
    	})
    	if got := int(allocs); got != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  6. src/runtime/pprof/pprof.go

    	values := []int64{0, 0}
    	var locs []uint64
    	expandedStack := pprof_makeProfStack()
    	for _, r := range records {
    		values[0] = r.Count
    		values[1] = int64(float64(r.Cycles) / cpuGHz)
    		// For count profiles, all stack addresses are
    		// return PCs, which is what appendLocsForStack expects.
    		n := pprof_fpunwindExpand(expandedStack[:], r.Stack)
    		locs = b.appendLocsForStack(locs[:0], expandedStack[:n])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  7. src/internal/xcoff/xcoff.go

    }
    
    type Reloc32 struct {
    	Rvaddr  uint32 // (virtual) address of reference
    	Rsymndx uint32 // Index into symbol table
    	Rsize   uint8  // Sign and reloc bit len
    	Rtype   uint8  // Toc relocation type
    }
    
    type Reloc64 struct {
    	Rvaddr  uint64 // (virtual) address of reference
    	Rsymndx uint32 // Index into symbol table
    	Rsize   uint8  // Sign and reloc bit len
    	Rtype   uint8  // Toc relocation type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 08 20:36:37 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  8. pkg/kubelet/userns/userns_manager_test.go

    		// The last ID of the userns range (allocated+userNsLength) should be within bounds.
    		assert.True(t, allocated <= minimumMappingUID+mappingLen-userNsLength)
    		allocs = append(allocs, allocated)
    	}
    	for i, v := range allocs {
    		assert.Equal(t, true, m.isSet(v), "m.isSet(%d) should be true", v)
    		m.Release(types.UID(fmt.Sprintf("%d", i)))
    		assert.Equal(t, false, m.isSet(v), "m.isSet(%d) should be false", v)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  9. src/io/multi_test.go

    	type simpleWriter struct { // hide bytes.Buffer's WriteString
    		Writer
    	}
    	mw := MultiWriter(simpleWriter{&sink1}, simpleWriter{&sink2})
    	allocs := int(testing.AllocsPerRun(1000, func() {
    		WriteString(mw, "foo")
    	}))
    	if allocs != 1 {
    		t.Errorf("num allocations = %d; want 1", allocs)
    	}
    }
    
    type writeStringChecker struct{ called bool }
    
    func (c *writeStringChecker) WriteString(s string) (n int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:32 UTC 2022
    - 10K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go

    		s := utilrand.String(size)
    		f := func() {
    			b := toBytes(s)
    			if len(b) != size {
    				t.Errorf("invalid length: %d", len(b))
    			}
    		}
    		allocs := testing.AllocsPerRun(100, f)
    		if allocs > 0 {
    			t.Errorf("expected zero allocations, got %v", allocs)
    		}
    	})
    
    	t.Run("toString semantics", func(t *testing.T) {
    		t.Parallel()
    
    		b := make([]byte, size)
    		if _, err := rand.Read(b); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 20.3K bytes
    - Viewed (0)
Back to top