Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 47 for NotInHeap (0.28 sec)

  1. src/runtime/mcache.go

    // No locking needed because it is per-thread (per-P).
    //
    // mcaches are allocated from non-GC'd memory, so any heap pointers
    // must be specially handled.
    type mcache struct {
    	_ sys.NotInHeap
    
    	// The following members are accessed on every malloc,
    	// so they are grouped here for better caching.
    	nextSample uintptr // trigger heap sample after allocating this many bytes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. src/runtime/mspanset.go

    	return ht
    }
    
    // reset clears the headTailIndex to (0, 0).
    func (h *atomicHeadTailIndex) reset() {
    	h.u.Store(0)
    }
    
    // atomicMSpanPointer is an atomic.Pointer[mspan]. Can't use generics because it's NotInHeap.
    type atomicMSpanPointer struct {
    	p atomic.UnsafePointer
    }
    
    // Load returns the *mspan.
    func (p *atomicMSpanPointer) Load() *mspan {
    	return (*mspan)(p.p.Load())
    }
    
    // Store stores an *mspan.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  3. src/runtime/mgcwork.go

    // avoid contending on the global work buffer lists.
    
    type workbufhdr struct {
    	node lfnode // must be first
    	nobj int
    }
    
    type workbuf struct {
    	_ sys.NotInHeap
    	workbufhdr
    	// account for the above fields
    	obj [(_WorkbufSize - unsafe.Sizeof(workbufhdr{})) / goarch.PtrSize]uintptr
    }
    
    // workbuf factory routines. These funcs are used to manage the
    // workbufs.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/parser.go

    	obj := scope.Lookup(name)
    	if obj != nil && obj.Type() == nil {
    		p.errorf("%v has nil type", obj)
    	}
    
    	if p.tok == scanner.Ident && p.lit == "notinheap" {
    		p.next()
    		// The go/types package has no way of recording that
    		// this type is marked notinheap. Presumably no user
    		// of this package actually cares.
    	}
    
    	// type alias
    	if p.tok == '=' {
    		p.next()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  5. src/runtime/HACKING.md

      reused by the same fixalloc pool, so it can only be reused for
      objects of the same type.
    
    In general, types that are allocated using any of these should be
    marked as not in heap by embedding `runtime/internal/sys.NotInHeap`.
    
    Objects that are allocated in unmanaged memory **must not** contain
    heap pointers unless the following rules are also obeyed:
    
    1. Any pointers from unmanaged memory to the heap must be garbage
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  6. src/runtime/mfinal.go

    // must be specially handled. GC currently assumes that the finalizer
    // queue does not grow during marking (but it can shrink).
    type finblock struct {
    	_       sys.NotInHeap
    	alllink *finblock
    	next    *finblock
    	cnt     uint32
    	_       int32
    	fin     [(_FinBlockSize - 2*goarch.PtrSize - 2*4) / unsafe.Sizeof(finalizer{})]finalizer
    }
    
    var fingStatus atomic.Uint32
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/assign.go

    		r := recv.X // the channel
    		return mkcall1(chanfn("chanrecv1", 2, r.Type()), nil, init, r, n1)
    
    	case ir.OAPPEND:
    		// x = append(...)
    		call := as.Y.(*ir.CallExpr)
    		if call.Type().Elem().NotInHeap() {
    			base.Errorf("%v can't be allocated in Go; it is incomplete (or unallocatable)", call.Type().Elem())
    		}
    		var r ir.Node
    		switch {
    		case isAppendOfMake(call):
    			// x = append(y, make([]T, y)...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/func.go

    	if n.X.Type() == nil || n.Y.Type() == nil {
    		n.SetType(nil)
    		return n
    	}
    	t := n.X.Type()
    	if !t.IsPtr() {
    		base.Errorf("first argument to unsafe.Slice must be pointer; have %L", t)
    	} else if t.Elem().NotInHeap() {
    		// TODO(mdempsky): This can be relaxed, but should only affect the
    		// Go runtime itself. End users should only see not-in-heap
    		// types due to incomplete C structs in cgo, and those types don't
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/typecheck.go

    				checklvalue(n.X, "call pointer method on")
    				addr := NodAddr(n.X)
    				addr.SetImplicit(true)
    				n.X = typecheck(addr, ctxType|ctxExpr)
    			} else if tt.IsPtr() && (!rcvr.IsPtr() || rcvr.IsPtr() && rcvr.Elem().NotInHeap()) && types.Identical(tt.Elem(), rcvr) {
    				star := ir.NewStarExpr(base.Pos, n.X)
    				star.SetImplicit(true)
    				n.X = typecheck(star, ctxType|ctxExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  10. src/runtime/stack.go

    var stackpool [_NumStackOrders]struct {
    	item stackpoolItem
    	_    [(cpu.CacheLinePadSize - unsafe.Sizeof(stackpoolItem{})%cpu.CacheLinePadSize) % cpu.CacheLinePadSize]byte
    }
    
    type stackpoolItem struct {
    	_    sys.NotInHeap
    	mu   mutex
    	span mSpanList
    }
    
    // Global pool of large stack spans.
    var stackLarge struct {
    	lock mutex
    	free [heapAddrBits - pageShift]mSpanList // free lists by log_2(s.npages)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
Back to top