Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for NotInHeap (0.13 sec)

  1. src/go/internal/gccgoimporter/testdata/notinheap.gox

    v3;
    package notinheap
    pkgpath notinheap
    init notinheap ~notinheap
    types 3 2 30 18
    type 1 "S" notinheap <type 2>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 27 20:49:38 UTC 2020
    - 130 bytes
    - Viewed (0)
  2. src/go/internal/gccgoimporter/testdata/notinheap.go

    package notinheap
    
    //go:notinheap
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 27 20:49:38 UTC 2020
    - 50 bytes
    - Viewed (0)
  3. test/fixedbugs/notinheap.go

    type okay1 *nih
    
    type okay2 []nih
    
    type okay3 func(x nih) nih
    
    type okay4 interface {
    	f(x nih) nih
    }
    
    // Type conversions don't let you sneak past notinheap.
    
    type t1 struct{ x int }
    
    //go:notinheap
    type t2 t1
    
    //go:notinheap
    type t3 byte
    
    //go:notinheap
    type t4 rune
    
    var sink interface{}
    
    func i() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 17:46:15 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  4. test/fixedbugs/notinheap2.go

    type embed1 struct { // implicitly notinheap
    	x nih
    }
    
    type embed2 [1]nih // implicitly notinheap
    
    type embed3 struct { // implicitly notinheap
    	x [1]nih
    }
    
    // Type aliases inherit the go:notinheap-ness of the type they alias.
    type nihAlias = nih
    
    type embedAlias1 struct { // implicitly notinheap
    	x nihAlias
    }
    type embedAlias2 [1]nihAlias // implicitly notinheap
    
    func g() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 17:46:15 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  5. test/fixedbugs/bug514.go

    package main
    
    import "runtime/cgo"
    
    type iface interface {
    	Get() int
    }
    
    type notInHeap struct {
    	_ cgo.Incomplete
    	i int
    }
    
    type myInt struct {
    	f *notInHeap
    }
    
    func (mi myInt) Get() int {
    	return int(mi.f.i)
    }
    
    type embed struct {
    	*myInt
    }
    
    var val = 1234
    
    var valNotInHeap = notInHeap{i: val}
    
    func main() {
    	i := val
    	check(i)
    	mi := myInt{f: &valNotInHeap}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 15:27:18 UTC 2022
    - 782 bytes
    - Viewed (0)
  6. src/reflect/nih_test.go

    	}
    
    	v = ValueOf((*nih)(unsafe.Pointer(new(int))))
    	shouldPanic("reflect: reflect.Value.Elem on an invalid notinheap pointer", func() { v.Elem() })
    	shouldPanic("reflect: reflect.Value.Pointer on an invalid notinheap pointer", func() { v.Pointer() })
    	shouldPanic("reflect: reflect.Value.UnsafePointer on an invalid notinheap pointer", func() { v.UnsafePointer() })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 01:16:54 UTC 2022
    - 1004 bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/issue42018_windows.go

    	if n > 0 {
    		recurseHANDLE(n-1, p, v)
    	}
    	if uintptr(unsafe.Pointer(p)) != v {
    		panic("adjusted notinheap pointer")
    	}
    }
    
    func recurseHWND(n int, p C.HWND, v uintptr) {
    	if n > 0 {
    		recurseHWND(n-1, p, v)
    	}
    	if uintptr(unsafe.Pointer(p)) != v {
    		panic("adjusted notinheap pointer")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  8. src/runtime/traceregion.go

    //
    // traceRegionAllocBlock is allocated from non-GC'd memory, so it must not
    // contain heap pointers. Writes to pointers to traceRegionAllocBlocks do
    // not need write barriers.
    type traceRegionAllocBlock struct {
    	_ sys.NotInHeap
    	traceRegionAllocBlockHeader
    	data [traceRegionAllocBlockData]byte
    }
    
    type traceRegionAllocBlockHeader struct {
    	next *traceRegionAllocBlock
    	off  atomic.Uintptr
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. src/runtime/internal/sys/nih.go

    // NOTE: keep in sync with cmd/compile/internal/types.CalcSize
    // to make the compiler recognize this as an intrinsic type.
    type nih struct{}
    
    // NotInHeap is a type must never be allocated from the GC'd heap or on the stack,
    // and is called not-in-heap.
    //
    // Other types can embed NotInHeap to make it not-in-heap. Specifically, pointers
    // to these types must always fail the `runtime.inheap` check. The type may be used
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 18:24:50 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  10. src/runtime/tracemap.go

    //     get shifted out during iteration, and new nodes will just be appended to the 0th child).
    type traceMapNode struct {
    	_ sys.NotInHeap
    
    	children [4]atomic.UnsafePointer // *traceMapNode (can't use generics because it's notinheap)
    	hash     uintptr
    	id       uint64
    	data     []byte
    }
    
    // stealID steals an ID from the table, ensuring that it will not
    // appear in the table anymore.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top