Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 383 for flive (0.04 sec)

  1. src/cmd/compile/internal/test/testdata/unsafe_test.go

    	var x uintptr
    	if always {
    		x = uintptr(unsafe.Pointer(a))
    	} else {
    		x = 0
    	}
    	// Clobber the global pointer. The only live ref
    	// to the allocated object is now x.
    	a = nil
    
    	// Convert to pointer so it should hold
    	// the object live across GC call.
    	p := unsafe.Pointer(x)
    
    	// Call gc.
    	runtime.GC()
    
    	// Convert back to uintptr.
    	y := uintptr(p)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 3K bytes
    - Viewed (0)
  2. test/finprofiled.go

    	// only for middle bytes. The finalizer resurrects that object.
    	// As the result, all allocated memory must stay alive.
    	const (
    		N             = 1 << 20
    		tinyBlockSize = 16 // runtime._TinySize
    	)
    	hold := make([]*int32, 0, N)
    	for i := 0; i < N; i++ {
    		x := new(int32)
    		if i%3 == 0 {
    			runtime.SetFinalizer(x, func(p *int32) {
    				hold = append(hold, p)
    			})
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 05:48:00 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/zerorange_test.go

    // improve coverage of the compiler's arch-specific "zerorange"
    // function, which is invoked to zero out ambiguously live portions of
    // the stack frame in certain specific circumstances.
    //
    // In the current compiler implementation, for zerorange to be
    // invoked, we need to have an ambiguously live variable that needs
    // zeroing. One way to trigger this is to have a function with an
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  4. src/sync/oncefunc_test.go

    			}
    			f()
    			gcwaitfin()
    			if gc.Load() != true {
    				// Even if f is still alive, the function passed to Once(Func|Value|Values)
    				// is not kept alive after the first call to f.
    				t.Fatal("wrapped function should be garbage collected, but still live")
    			}
    			f()
    		})
    	}
    }
    
    // gcwaitfin performs garbage collection and waits for all finalizers to run.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:31:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  5. test/slicecap.go

    		checkString("x[5:]", x[5:])
    		checkString("x[five:]", x[five:])
    		checkString("x[5:five]", x[5:five])
    		checkString("x[five:5]", x[five:5])
    		checkString("x[five:five]", x[five:five])
    		checkString("x[1:][2:][2:]", x[1:][2:][2:])
    		y := x[4:]
    		checkString("y[1:]", y[1:])
    	}
    	{
    		x := bytes
    		checkBytes("x", x)
    		checkBytes("x[5:]", x[5:])
    		checkBytes("x[five:]", x[five:])
    		checkBytes("x[5:five]", x[5:five])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1.9K bytes
    - Viewed (0)
  6. test/fixedbugs/issue15747.go

    var b bool
    
    func f1(q *Q, xx []byte) interface{} { // ERROR "live at call to newobject: xx$" "live at entry to f1: xx$"
    	// xx was copied from the stack to the heap on the previous line:
    	// xx was live for the first two prints but then it switched to &xx
    	// being live. We should not see plain xx again.
    	if b {
    		global = &xx
    	}
    	xx, _, err := f2(xx, 5) // ERROR "live at call to f2: &xx$"
    	if err != nil {
    		return err
    	}
    	return nil
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/deadcode.go

    func liveValues(f *Func, reachable []bool) (live []bool, liveOrderStmts []*Value) {
    	live = f.Cache.allocBoolSlice(f.NumValues())
    	liveOrderStmts = f.Cache.allocValueSlice(f.NumValues())[:0]
    
    	// After regalloc, consider all values to be live.
    	// See the comment at the top of regalloc.go and in deadcode for details.
    	if f.RegAlloc != nil {
    		for i := range live {
    			live[i] = true
    		}
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 00:29:01 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  8. test/uintptrescapes2.go

    	F4(0, 1, uintptr(unsafe.Pointer(&v2)), 2) // ERROR "live at call to newobject: .?autotmp" "live at call to F4: .?autotmp" "escapes to heap" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
    }
    
    func TestM2() {
    	var t T
    	var v int                                  // ERROR "moved to heap"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 24 18:24:24 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  9. test/fixedbugs/bug366.go

    // Issue 2206.  Incorrect sign extension of div arguments.
    
    package main
    
    func five(x int64) {
    	if x != 5 {
    		panic(x)
    	}
    }
    
    func main() {
           // 5
           five(int64(5 / (5 / 3)))
    
           // 5
           five(int64(byte(5) / (byte(5) / byte(3))))
    
           // 5
           var a, b byte = 5, 3
           five(int64(a / (a / b)))
           
           // integer divide by zero in golang.org sandbox
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 799 bytes
    - Viewed (0)
  10. test/abi/result_live.go

    // errorcheck -0 -live
    
    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    type T struct { a, b, c, d string } // pass in registers, not SSA-able
    
    //go:registerparams
    func F() (r T) {
    	r.a = g(1) // ERROR "live at call to g: r"
    	r.b = g(2) // ERROR "live at call to g: r"
    	r.c = g(3) // ERROR "live at call to g: r"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 19 14:51:24 UTC 2021
    - 510 bytes
    - Viewed (0)
Back to top