Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 536 for zeroing (1.84 sec)

  1. src/runtime/slice.go

    	var to unsafe.Pointer
    	if !et.Pointers() {
    		to = mallocgc(tomem, nil, false)
    		if copymem < tomem {
    			memclrNoHeapPointers(add(to, copymem), tomem-copymem)
    		}
    	} else {
    		// Note: can't use rawmem (which avoids zeroing of memory), because then GC can scan uninitialized memory.
    		to = mallocgc(tomem, et, true)
    		if copymem > 0 && writeBarrier.enabled {
    			// Only shade the pointers in old.array since we know the destination slice to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/crypto/sha3/sha3.go

    func (d *state) BlockSize() int { return d.rate }
    
    // Size returns the output size of the hash function in bytes.
    func (d *state) Size() int { return d.outputLen }
    
    // Reset clears the internal state by zeroing the sponge state and
    // the buffer indexes, and setting Sponge.state to absorbing.
    func (d *state) Reset() {
    	// Zero the permutation's state.
    	for i := range d.a {
    		d.a[i] = 0
    	}
    	d.state = spongeAbsorbing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/_gen/Wasm.rules

    		(I64Store32 destptr (I64Const [0]) mem))
    (Zero [7] destptr mem) =>
    	(I64Store32 [3] destptr (I64Const [0])
    		(I64Store32 destptr (I64Const [0]) mem))
    
    // Strip off any fractional word zeroing.
    (Zero [s] destptr mem) && s%8 != 0 && s > 8 && s < 32 =>
    	(Zero [s-s%8] (OffPtr <destptr.Type> destptr [s%8])
    		(I64Store destptr (I64Const [0]) mem))
    
    // Zero small numbers of words directly.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 03:56:57 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  4. src/runtime/mbarrier.go

    	if goexperiment.CgoCheck2 {
    		cgoCheckMemmove2(typ, dst, src, 0, typ.Size_)
    	}
    }
    
    // wbZero performs the write barrier operations necessary before
    // zeroing a region of memory at address dst of type typ.
    // Does not actually do the zeroing.
    //
    //go:nowritebarrierrec
    //go:nosplit
    func wbZero(typ *_type, dst unsafe.Pointer) {
    	// This always copies a full value of type typ so it's safe
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/range.go

    	fn := typecheck.LookupRuntime("mapclear", t.Key(), t.Elem())
    	n := mkcallstmt1(fn, rtyp, m)
    	return walkStmt(typecheck.Stmt(n))
    }
    
    // Lower n into runtime·memclr if possible, for
    // fast zeroing of slices and arrays (issue 5373).
    // Look for instances of
    //
    //	for i := range a {
    //		a[i] = zero
    //	}
    //
    // in which the evaluation of a is side-effect-free.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  6. src/runtime/mkduff.go

    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    // runtime·duffzero is a Duff's device for zeroing memory.
    // The compiler jumps to computed addresses within
    // the routine to zero chunks of memory.
    // Do not change duffzero without also
    // changing the uses in cmd/compile/internal/*/*.go.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 19:04:21 UTC 2023
    - 8K bytes
    - Viewed (0)
  7. src/sync/poolqueue.go

    			break
    		}
    	}
    
    	// We now own slot.
    	val := *(*any)(unsafe.Pointer(slot))
    	if val == dequeueNil(nil) {
    		val = nil
    	}
    
    	// Tell pushHead that we're done with this slot. Zeroing the
    	// slot is also important so we don't leave behind references
    	// that could keep this object live longer than necessary.
    	//
    	// We write to val first and then publish that we're done with
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 18:12:29 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/_gen/LOONG64.rules

    			(MOVVstore [0] ptr (MOVVconst [0]) mem)))
    
    // medium zeroing uses a duff device
    // 8, and 128 are magic constants, see runtime/mkduff.go
    (Zero [s] {t} ptr mem)
    	&& s%8 == 0 && s > 24 && s <= 8*128
    	&& t.Alignment()%8 == 0 && !config.noDuffDevice =>
    	(DUFFZERO [8 * (128 - s/8)] ptr mem)
    
    // large or unaligned zeroing uses a loop
    (Zero [s] {t} ptr mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 19:26:25 UTC 2023
    - 31.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/assign.go

    	} else {
    		n.(*ir.AssignStmt).X = left
    	}
    	as := n.(*ir.AssignStmt)
    
    	if oaslit(as, init) {
    		return ir.NewBlockStmt(as.Pos(), nil)
    	}
    
    	if as.Y == nil {
    		// TODO(austin): Check all "implicit zeroing"
    		return as
    	}
    
    	if !base.Flag.Cfg.Instrumenting && ir.IsZero(as.Y) {
    		return as
    	}
    
    	switch as.Y.Op() {
    	default:
    		as.Y = walkExpr(as.Y, init)
    
    	case ir.ORECV:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/_gen/MIPS64.rules

    			(MOVVstore [0] ptr (MOVVconst [0]) mem)))
    
    // medium zeroing uses a duff device
    // 8, and 128 are magic constants, see runtime/mkduff.go
    (Zero [s] {t} ptr mem)
    	&& s%8 == 0 && s > 24 && s <= 8*128
    	&& t.Alignment()%8 == 0 && !config.noDuffDevice =>
    	(DUFFZERO [8 * (128 - s/8)] ptr mem)
    
    // large or unaligned zeroing uses a loop
    (Zero [s] {t} ptr mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 03:59:48 UTC 2023
    - 41.9K bytes
    - Viewed (0)
Back to top