Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 260 for zeroing (0.56 sec)

  1. test/fixedbugs/issue5373.go

    // run
    
    // 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.
    
    // Ensure that zeroing range loops have the requisite side-effects.
    
    package main
    
    import (
    	"fmt"
    	"os"
    )
    
    func check(n int) {
    	// When n == 0, i is untouched by the range loop.
    	// Picking an initial value of -1 for i makes the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/riscv64/ggen.go

    		p = pp.Append(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_MEM, 0, 0)
    		p.To.Name = obj.NAME_EXTERN
    		p.To.Sym = ir.Syms.Duffzero
    		p.To.Offset = 8 * (128 - cnt/int64(types.PtrSize))
    		return p
    	}
    
    	// Loop, zeroing pointer width bytes at a time.
    	// ADD	$(off), SP, T0
    	// ADD	$(cnt), T0, T1
    	// loop:
    	// 	MOV	ZERO, (T0)
    	// 	ADD	$Widthptr, T0
    	//	BNE	T0, T1, loop
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 19 15:59:22 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  3. src/internal/bytealg/bytealg.go

    		h -= pow * uint32(s[i+n])
    		if h == hashss && string(s[i:i+n]) == string(sep) {
    			return i
    		}
    	}
    	return -1
    }
    
    // MakeNoZero makes a slice of length n and capacity of at least n Bytes
    // without zeroing the bytes (including the bytes between len and cap).
    // It is the caller's responsibility to ensure uninitialized bytes
    // do not leak to the end user.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 19 19:51:15 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. src/runtime/mfixalloc.go

    // Malloc uses a FixAlloc wrapped around sysAlloc to manage its
    // mcache and mspan objects.
    //
    // Memory returned by fixalloc.alloc is zeroed by default, but the
    // caller may take responsibility for zeroing allocations by setting
    // the zero flag to false. This is only safe if the memory never
    // contains heap pointers.
    //
    // The caller is responsible for locking around FixAlloc calls.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 24 20:28:25 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. pkg/slices/slices.go

    func FilterInPlace[E any](s []E, f func(E) bool) []E {
    	n := 0
    	for _, val := range s {
    		if f(val) {
    			s[n] = val
    			n++
    		}
    	}
    
    	// If those elements contain pointers you might consider zeroing those elements
    	// so that objects they reference can be garbage collected."
    	var empty E
    	for i := n; i < len(s); i++ {
    		s[i] = empty
    	}
    
    	s = s[:n]
    	return s
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 06:28:11 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. src/runtime/memclr_arm64.s

    ending:
    	RET
    
    zero_exact_16:
    	// n is exactly 16 bytes
    	STP	(ZR, ZR), (R0)
    	RET
    
    zero_by_16:
    	// n greater than 16 bytes, check if the start address is aligned
    	NEG	R0, R4
    	ANDS	$15, R4, R4
    	// Try zeroing using zva if the start address is aligned with 16
    	BEQ	try_zva
    
    	// Non-aligned store
    	STP	(ZR, ZR), (R0)
    	// Make the destination aligned
    	SUB	R4, R1, R1
    	ADD	R4, R0, R0
    	B	try_zva
    
    tail_maybe_long:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 18 18:26:13 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/test/zerorange_test.go

    // the stack frame in certain specific circumstances.
    //
    // In the current compiler implementation, for zerorange to be
    // invoked, we need to have an ambiguously live variable that needs
    // zeroing. One way to trigger this is to have a function with an
    // open-coded defer, where the opendefer function has an argument that
    // contains a pointer (this is what's used below).
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 01 18:18:07 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/test/testdata/gen/zeroGen.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"bytes"
    	"fmt"
    	"go/format"
    	"log"
    	"os"
    )
    
    // This program generates tests to verify that zeroing operations
    // zero the data they are supposed to and clobber no adjacent values.
    
    // run as `go run zeroGen.go`.  A file called zero.go
    // will be written into the parent directory containing the tests.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  9. 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)
  10. test/writebarrier.go

    	// this is a case that the frontend failed to eliminate.
    	p := &y
    	*p = x // no barrier
    	return
    }
    
    type T23 struct {
    	p *int
    	a int
    }
    
    var t23 T23
    var i23 int
    
    // f23x: zeroing global needs write barrier for the hybrid barrier.
    func f23a() {
    	t23 = T23{} // ERROR "write barrier"
    }
    
    func f23b() {
    	// also test partial assignments
    	t23 = T23{a: 1} // ERROR "write barrier"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 23 19:46:36 UTC 2021
    - 5.9K bytes
    - Viewed (0)
Back to top