Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for nelem (0.1 sec)

  1. src/runtime/mheap.go

    	// then object n is free;
    	// otherwise, object n is allocated. Bits starting at nelem are
    	// undefined and should never be referenced.
    	//
    	// Object n starts at address n*elemsize + (start << pageShift).
    	freeindex uint16
    	// TODO: Look up nelems from sizeclass and remove this field if it
    	// helps performance.
    	nelems uint16 // number of object in the span.
    	// freeIndexForScan is like freeindex, except that freeindex is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  2. src/runtime/mbitmap.go

    		}
    		return tp
    	}
    
    	// Move up elem and addr.
    	// Offsets within an element are always at a ptrBits*goarch.PtrSize boundary.
    	if n >= tp.typ.Size_ {
    		// elem needs to be moved to the element containing
    		// tp.addr + n.
    		oldelem := tp.elem
    		tp.elem += (tp.addr - tp.elem + n) / tp.typ.Size_ * tp.typ.Size_
    		tp.addr = tp.elem + alignDown(n-(tp.elem-oldelem), ptrBits*goarch.PtrSize)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  3. src/runtime/map.go

    	p := mapassign(t, h, key)
    	typedmemmove(t.Elem, p, elem)
    }
    
    //go:linkname reflect_mapassign_faststr reflect.mapassign_faststr0
    func reflect_mapassign_faststr(t *maptype, h *hmap, key string, elem unsafe.Pointer) {
    	p := mapassign_faststr(t, h, key)
    	typedmemmove(t.Elem, p, elem)
    }
    
    //go:linkname reflect_mapdelete reflect.mapdelete
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  4. src/reflect/type.go

    	// The methods allowed for each kind are:
    	//
    	//	Int*, Uint*, Float*, Complex*: Bits
    	//	Array: Elem, Len
    	//	Chan: ChanDir, Elem
    	//	Func: In, NumIn, Out, NumOut, IsVariadic.
    	//	Map: Key, Elem
    	//	Pointer: Elem
    	//	Slice: Elem
    	//	Struct: Field, FieldByIndex, FieldByName, FieldByNameFunc, NumField
    
    	// Bits returns the size of the type in bits.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  5. src/net/url/url_test.go

    			base: "https://go.googlesource.com/a/b",
    			elem: []string{"/go"},
    			out:  "https://go.googlesource.com/a/b/go",
    		},
    		{
    			base: "/",
    			elem: nil,
    			out:  "/",
    		},
    		{
    			base: "a",
    			elem: nil,
    			out:  "a",
    		},
    		{
    			base: "a",
    			elem: []string{"b"},
    			out:  "a/b",
    		},
    		{
    			base: "a",
    			elem: []string{"../b"},
    			out:  "b",
    		},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:52:38 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  6. pkg/apis/core/v1/defaults_test.go

    				toVisit = append(toVisit, testPath{path: visit.path + "[*]", value: item})
    			} else if !isPrimitive(visit.value.Type().Elem().Kind()) {
    				t.Logf("unhandled non-primitive map type %s: %s", visit.path, visit.value.Type().Elem())
    			}
    
    		case visit.value.Kind() == reflect.Pointer:
    			if visit.value.IsNil() {
    				if visit.value.Type().Elem().Kind() == reflect.Struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 84.4K bytes
    - Viewed (0)
  7. src/runtime/malloc.go

    	freeIndex := s.nextFreeIndex()
    	if freeIndex == s.nelems {
    		// The span is full.
    		if s.allocCount != s.nelems {
    			println("runtime: s.allocCount=", s.allocCount, "s.nelems=", s.nelems)
    			throw("s.allocCount != s.nelems && freeIndex == s.nelems")
    		}
    		c.refill(spc)
    		shouldhelpgc = true
    		s = c.alloc[spc]
    
    		freeIndex = s.nextFreeIndex()
    	}
    
    	if freeIndex >= s.nelems {
    		throw("freeIndex is not valid")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  8. src/cmd/dist/build.go

    		if gohostos == "darwin" && filepath.Base(f) == ".DS_Store" {
    			continue // unfortunate but not unexpected
    		}
    		elem := strings.TrimSuffix(filepath.Base(f), ".exe")
    		if !ok[f] && elem != "go" && elem != "gofmt" && elem != goos+"_"+goarch {
    			fatalf("unexpected new file in $GOROOT/bin: %s", elem)
    		}
    	}
    
    	// Remove go_bootstrap now that we're done.
    	xremove(pathf("%s/go_bootstrap"+exe, tooldir))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  9. src/go/types/expr.go

    			// See analogous comment for *Array.
    			if utyp.elem == nil {
    				check.error(e, InvalidTypeCycle, "invalid recursive type")
    				goto Error
    			}
    			check.indexedElts(e.Elts, utyp.elem, -1)
    
    		case *Map:
    			// Prevent crash if the map referred to is not yet set up.
    			// See analogous comment for *Array.
    			if utyp.key == nil || utyp.elem == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  10. src/encoding/json/decode_test.go

    				}
    				vv := reflect.New(reflect.TypeOf(tt.ptr).Elem())
    				dec = NewDecoder(bytes.NewReader(enc))
    				if tt.useNumber {
    					dec.UseNumber()
    				}
    				if err := dec.Decode(vv.Interface()); err != nil {
    					t.Fatalf("%s: Decode(%#q) error after roundtrip: %v", tt.Where, enc, err)
    				}
    				if !reflect.DeepEqual(v.Elem().Interface(), vv.Elem().Interface()) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
Back to top