Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for Needzero (0.27 sec)

  1. src/cmd/compile/internal/ssagen/pgen.go

    	ap := a.Type().HasPointers()
    	bp := b.Type().HasPointers()
    	if ap != bp {
    		return ap
    	}
    
    	// Group variables that need zeroing, so we can efficiently zero
    	// them altogether.
    	ap = a.Needzero()
    	bp = b.Needzero()
    	if ap != bp {
    		return ap
    	}
    
    	// Sort variables in descending alignment order, so we can optimally
    	// pack variables into the frame.
    	if a.Type().Alignment() != b.Type().Alignment() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/liveness/plive.go

    				// occur (almost) anywhere. Because it is live
    				// everywhere, it must be zeroed on entry.
    				livedefer.Set(int32(i))
    				// It was already marked as Needzero when created.
    				if !n.Needzero() {
    					base.Fatalf("all pointer-containing defer arg slots should have Needzero set")
    				}
    			}
    		}
    	}
    
    	// We must analyze the entry block first. The runtime assumes
    	// the function entry map is index 0. Conveniently, layout
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 15:22:22 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  3. src/runtime/arena.go

    		if ok {
    			ptr = unsafe.Pointer(v)
    		}
    	}
    	if ptr == nil {
    		// Failed to allocate.
    		mp.mallocing = 0
    		releasem(mp)
    		return nil
    	}
    	if s.needzero != 0 {
    		throw("arena chunk needs zeroing, but should already be zeroed")
    	}
    	// Set up heap bitmap and do extra accounting.
    	if typ.Pointers() {
    		if cap >= 0 {
    			userArenaHeapBitsSetSliceType(typ, cap, ptr, s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  4. src/runtime/mgcsweep.go

    			// Only mark the span as needing zeroing if we've freed any
    			// objects, because a fresh span that had been allocated into,
    			// wasn't totally filled, but then swept, still has all of its
    			// free slots zeroed.
    			s.needzero = 1
    			stats := memstats.heapStats.acquire()
    			atomic.Xadd64(&stats.smallFreeCount[spc.sizeclass()], int64(nfreed))
    			memstats.heapStats.release()
    
    			// Count the frees in the inconsistent, internal stats.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:52:18 UTC 2024
    - 32.9K bytes
    - Viewed (0)
  5. src/encoding/gob/enc_helpers.go

    	slice, ok := v.Interface().([]bool)
    	if !ok {
    		// It is kind bool but not type bool. TODO: We can handle this unsafely.
    		return false
    	}
    	for _, x := range slice {
    		if x != false || state.sendZero {
    			if x {
    				state.encodeUint(1)
    			} else {
    				state.encodeUint(0)
    			}
    		}
    	}
    	return true
    }
    
    func encComplex64Array(state *encoderState, v reflect.Value) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 10 17:50:11 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  6. src/encoding/gob/encode.go

    	b := v.Bool()
    	if b || state.sendZero {
    		state.update(i)
    		if b {
    			state.encodeUint(1)
    		} else {
    			state.encodeUint(0)
    		}
    	}
    }
    
    // encInt encodes the signed integer (int int8 int16 int32 int64) referenced by v.
    func encInt(i *encInstr, state *encoderState, v reflect.Value) {
    	value := v.Int()
    	if value != 0 || state.sendZero {
    		state.update(i)
    		state.encodeInt(value)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    //go:build ignore
    
    package runtime
    
    // emitted by compiler, not referred to by go programs
    
    import "unsafe"
    
    func newobject(typ *byte) *any
    func mallocgc(size uintptr, typ *byte, needszero bool) unsafe.Pointer
    func panicdivide()
    func panicshift()
    func panicmakeslicelen()
    func panicmakeslicecap()
    func throwinit()
    func panicwrap()
    
    func gopanic(interface{})
    func gorecover(*int32) interface{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. src/crypto/x509/parser.go

    func isValidIPMask(mask []byte) bool {
    	seenZero := false
    
    	for _, b := range mask {
    		if seenZero {
    			if b != 0 {
    				return false
    			}
    
    			continue
    		}
    
    		switch b {
    		case 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe:
    			seenZero = true
    		case 0xff:
    		default:
    			return false
    		}
    	}
    
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/builtin.go

    		size := ir.NewBinaryExpr(base.Pos, ir.OMUL, typecheck.Conv(length, types.Types[types.TUINTPTR]), typecheck.Conv(ir.NewInt(base.Pos, t.Elem().Size()), types.Types[types.TUINTPTR]))
    
    		// instantiate mallocgc(size uintptr, typ *byte, needszero bool) unsafe.Pointer
    		fn := typecheck.LookupRuntime("mallocgc")
    		ptr := mkcall1(fn, types.Types[types.TUNSAFEPTR], init, size, typecheck.NodNil(), ir.NewBool(base.Pos, false))
    		ptr.MarkNonNil()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top