Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,095 for heapLen (0.15 sec)

  1. src/cmd/link/internal/ld/outbuf.go

    		}
    		// See if our heap would grow to be too large, and if so, copy it to the end
    		// of the mmapped area.
    		if heapLen > maxOutBufHeapLen && out.copyHeap() {
    			heapPos -= heapLen
    			lenNeeded = heapPos + lenToWrite
    			heapLen = 0
    		}
    		out.heap = append(out.heap, make([]byte, lenNeeded-heapLen)...)
    	}
    	return heapPos, out.heap
    }
    
    func (out *OutBuf) SeekSet(p int64) {
    	out.off = p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/outbuf_test.go

    	}
    }
    
    // TestWriteLoc ensures that the math surrounding writeLoc is correct.
    func TestWriteLoc(t *testing.T) {
    	tests := []struct {
    		bufLen          int
    		off             int64
    		heapLen         int
    		lenToWrite      int64
    		expectedHeapLen int
    		writePos        int64
    		addressInHeap   bool
    	}{
    		{100, 0, 0, 100, 0, 0, false},
    		{100, 100, 0, 100, 100, 0, true},
    		{10, 10, 0, 100, 100, 0, true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 08 20:03:01 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  3. tests/group_by_test.go

    		t.Errorf("no error should happen, but got %v", err)
    	}
    
    	if name != "groupby" || total != 60 {
    		t.Errorf("name should be groupby, but got %v, total should be 60, but got %v", name, total)
    	}
    
    	if err := DB.Model(&User{}).Select("name, sum(age)").Where("name = ?", "groupby").Group("users.name").Row().Scan(&name, &total); err != nil {
    		t.Errorf("no error should happen, but got %v", err)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  4. src/internal/runtime/atomic/doc.go

    Unless otherwise noted, operations defined in this package are sequentially
    consistent across threads with respect to the values they manipulate. More
    specifically, operations that happen in a specific order on one thread,
    will always be observed to happen in exactly that order by another thread.
    */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 771 bytes
    - Viewed (0)
  5. src/os/executable_sysctl.go

    	if err != 0 {
    		return "", err
    	}
    	if n == 0 { // shouldn't happen
    		return "", nil
    	}
    	buf := make([]byte, n)
    	_, _, err = syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(unsafe.Pointer(&mib[0])), 4, uintptr(unsafe.Pointer(&buf[0])), uintptr(unsafe.Pointer(&n)), 0, 0)
    	if err != 0 {
    		return "", err
    	}
    	if n == 0 { // shouldn't happen
    		return "", nil
    	}
    	return string(buf[:n-1]), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 891 bytes
    - Viewed (0)
  6. tests/postgres_test.go

    	var result Yasuo
    	if err := DB.First(&result, "id = ?", yasuo.ID).Error; err != nil || yasuo.Name != "jinzhu" {
    		t.Errorf("No error should happen, but got %v", err)
    	}
    
    	if err := DB.Where("id = $1", yasuo.ID).First(&Yasuo{}).Error; err != nil || yasuo.Name != "jinzhu" {
    		t.Errorf("No error should happen, but got %v", err)
    	}
    
    	yasuo.Name = "jinzhu1"
    	if err := DB.Save(&yasuo).Error; err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Oct 08 09:16:32 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  7. src/runtime/metrics/example_test.go

    			fmt.Printf("%s: %f\n", name, medianBucket(value.Float64Histogram()))
    		case metrics.KindBad:
    			// This should never happen because all metrics are supported
    			// by construction.
    			panic("bug in runtime/metrics package!")
    		default:
    			// This may happen as new metrics get added.
    			//
    			// The safest thing to do here is to simply log it somewhere
    			// as something to look into, but ignore it for now.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 08 16:09:01 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/resource_operation_safety_analysis.h

    // enforce arbitrary ordering dependencies (via control or data edges) between
    // resource operations.  Since all resource reads happen before all resource
    // writes, edges constraining resource writes to happen before resource reads
    // are problematic.  This analysis returns the set of pairs of resource
    // operations that cannot be put in the same cluster because XLA cannot respect
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  9. src/crypto/elliptic/nistec_p256.go

    package elliptic
    
    import (
    	"crypto/internal/nistec"
    	"math/big"
    )
    
    func (c p256Curve) Inverse(k *big.Int) *big.Int {
    	if k.Sign() < 0 {
    		// This should never happen.
    		k = new(big.Int).Neg(k)
    	}
    	if k.Cmp(c.params.N) >= 0 {
    		// This should never happen.
    		k = new(big.Int).Mod(k, c.params.N)
    	}
    	scalar := k.FillBytes(make([]byte, 32))
    	inverse, err := nistec.P256OrdInverse(scalar)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 05 21:53:03 UTC 2022
    - 696 bytes
    - Viewed (0)
  10. src/sync/waitgroup.go

    // If the counter goes negative, Add panics.
    //
    // Note that calls with a positive delta that occur when the counter is zero
    // must happen before a Wait. Calls with a negative delta, or calls with a
    // positive delta that start when the counter is greater than zero, may happen
    // at any time.
    // Typically this means the calls to Add should execute before the statement
    // creating the goroutine or other event to be waited for.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top