Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for findObject (1.01 sec)

  1. src/runtime/lfstack.go

    }
    
    // lfnodeValidate panics if node is not a valid address for use with
    // lfstack.push. This only needs to be called when node is allocated.
    func lfnodeValidate(node *lfnode) {
    	if base, _, _ := findObject(uintptr(unsafe.Pointer(node)), 0, 0); base != 0 {
    		throw("lfstack node allocated from the heap")
    	}
    	if lfstackUnpack(lfstackPack(node, ^uintptr(0))) != node {
    		printlock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. src/runtime/mgcstack.go

    		idx = 0
    	}
    	right, x, idx = binarySearchTree(x, idx, n-n/2-1)
    	root.left = left
    	root.right = right
    	return root, x, idx
    }
    
    // findObject returns the stack object containing address a, if any.
    // Must have called buildIndex previously.
    func (s *stackScanState) findObject(a uintptr) *stackObject {
    	off := uint32(a - s.stack.lo)
    	obj := s.root
    	for {
    		if obj == nil {
    			return nil
    		}
    		if off < obj.off {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 21:06:52 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  3. src/runtime/checkptr.go

    		// all platforms, so it's guaranteed to be distinct
    		// from any of the addresses we might return below.
    		return 1
    	}
    
    	// heap (must check after stack because of #35068)
    	if base, _, _ := findObject(uintptr(p), 0, 0); base != 0 {
    		return base
    	}
    
    	// data or bss
    	for _, datap := range activeModules() {
    		if datap.data <= uintptr(p) && uintptr(p) < datap.edata {
    			return datap.data
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. src/runtime/mbitmap.go

    //
    // findObject should be an internal detail,
    // but widely used packages access it using linkname.
    // Notable members of the hall of shame include:
    //   - github.com/bytedance/sonic
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname findObject
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  5. operator/cmd/mesh/test-util_test.go

    	return got
    }
    
    func mustFindObject(t test.Failer, objs object.K8sObjects, name, kind string) object.K8sObject {
    	t.Helper()
    	o := findObject(objs, name, kind)
    	if o == nil {
    		t.Fatalf("expected %v/%v", name, kind)
    		return object.K8sObject{}
    	}
    	return *o
    }
    
    func findObject(objs object.K8sObjects, name, kind string) *object.K8sObject {
    	for _, o := range objs {
    		if o.Kind == kind && o.Name == name {
    			return o
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  6. src/runtime/mgcmark.go

    			// mark the object.
    			//
    			// Note that it's possible for findObject to
    			// fail if obj points to a just-allocated heap
    			// object because of a race with growing the
    			// heap. In this case, we know the object was
    			// just allocated and hence will be marked by
    			// allocation itself.
    			if obj, span, objIndex := findObject(obj, b, addr-b); obj != 0 {
    				greyobject(obj, b, addr-b, span, gcw, objIndex)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  7. src/runtime/mwbbuf.go

    			// other "obvious" non-heap pointers ASAP.
    			//
    			// TODO: Should we filter out nils in the fast
    			// path to reduce the rate of flushes?
    			continue
    		}
    		obj, span, objIndex := findObject(ptr, 0, 0)
    		if obj == 0 {
    			continue
    		}
    		// TODO: Consider making two passes where the first
    		// just prefetches the mark bits.
    		mbits := span.markBitsForIndex(objIndex)
    		if mbits.isMarked() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  8. src/runtime/pinner.go

    		unlock(&mheap_.speciallock)
    		return false
    	}
    	return true
    }
    
    // only for tests
    func pinnerGetPinCounter(addr unsafe.Pointer) *uintptr {
    	_, span, objIndex := findObject(uintptr(addr), 0, 0)
    	offset := objIndex * span.elemsize
    	t, exists := span.specialFindSplicePoint(offset, _KindSpecialPinCounter)
    	if !exists {
    		return nil
    	}
    	counter := (*specialPinCounter)(unsafe.Pointer(*t))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. src/runtime/race.go

    	heap  uintptr
    	start uintptr
    	size  uintptr
    	name  *byte
    	file  *byte
    	line  uintptr
    	res   uintptr
    }
    
    func raceSymbolizeData(ctx *symbolizeDataContext) {
    	if base, span, _ := findObject(ctx.addr, 0, 0); base != 0 {
    		// TODO: Does this need to handle malloc headers?
    		ctx.heap = 1
    		ctx.start = base
    		ctx.size = span.elemsize
    		ctx.res = 1
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  10. src/runtime/mfinal.go

    		// Arena-allocated objects are not eligible for finalizers.
    		throw("runtime.SetFinalizer: first argument was allocated into an arena")
    	}
    
    	// find the containing object
    	base, span, _ := findObject(uintptr(e.data), 0, 0)
    
    	if base == 0 {
    		if isGoPointerWithoutSpan(e.data) {
    			return
    		}
    		throw("runtime.SetFinalizer: pointer not in allocated block")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top