Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 207 for refill (0.2 sec)

  1. src/runtime/tracebuf.go

    //
    // Returns whether the buffer was flushed.
    func (w traceWriter) ensure(maxSize int) (traceWriter, bool) {
    	refill := w.traceBuf == nil || !w.available(maxSize)
    	if refill {
    		w = w.refill(traceNoExperiment)
    	}
    	return w, refill
    }
    
    // flush puts w.traceBuf on the queue of full buffers.
    func (w traceWriter) flush() traceWriter {
    	systemstack(func() {
    		lock(&trace.lock)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. src/crypto/cipher/ofb.go

    		bufSize = blockSize
    	}
    	x := &ofb{
    		b:       b,
    		cipher:  make([]byte, blockSize),
    		out:     make([]byte, 0, bufSize),
    		outUsed: 0,
    	}
    
    	copy(x.cipher, iv)
    	return x
    }
    
    func (x *ofb) refill() {
    	bs := x.b.BlockSize()
    	remain := len(x.out) - x.outUsed
    	if remain > x.outUsed {
    		return
    	}
    	copy(x.out, x.out[x.outUsed:])
    	x.out = x.out[:cap(x.out)]
    	for remain < len(x.out)-bs {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. src/runtime/traceexp.go

    //
    // Returns whether the buffer was flushed.
    func (w traceExpWriter) ensure(maxSize int) (traceExpWriter, bool) {
    	refill := w.traceBuf == nil || !w.available(maxSize)
    	if refill {
    		w.traceWriter = w.traceWriter.refill(w.exp)
    	}
    	return w, refill
    }
    
    // traceExperiment is an enumeration of the different kinds of experiments supported for tracing.
    type traceExperiment uint8
    
    const (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. src/internal/chacha8rand/chacha8.go

    	s.seed = seed
    	block(&s.seed, &s.buf, 0)
    	s.c = 0
    	s.i = 0
    	s.n = chunk
    }
    
    // Refill refills the state with more random values.
    // After a call to Refill, an immediate call to Next will succeed
    // (unless multiple goroutines are incorrectly sharing a state).
    func (s *State) Refill() {
    	s.c += ctrInc
    	if s.c == ctrMax {
    		// Reseed with generated uint64s for forward secrecy.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. src/crypto/cipher/ctr.go

    	if bufSize < block.BlockSize() {
    		bufSize = block.BlockSize()
    	}
    	return &ctr{
    		b:       block,
    		ctr:     bytes.Clone(iv),
    		out:     make([]byte, 0, bufSize),
    		outUsed: 0,
    	}
    }
    
    func (x *ctr) refill() {
    	remain := len(x.out) - x.outUsed
    	copy(x.out, x.out[x.outUsed:])
    	x.out = x.out[:cap(x.out)]
    	bs := x.b.BlockSize()
    	for remain <= len(x.out)-bs {
    		x.b.Encrypt(x.out[remain:], x.ctr)
    		remain += bs
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  6. src/crypto/aes/ctr_s390x.go

    	}
    	var ac aesctr
    	ac.block = c
    	ac.ctr[0] = byteorder.BeUint64(iv[0:]) // high bits
    	ac.ctr[1] = byteorder.BeUint64(iv[8:]) // low bits
    	ac.buffer = ac.storage[:0]
    	return &ac
    }
    
    func (c *aesctr) refill() {
    	// Fill up the buffer with an incrementing count.
    	c.buffer = c.storage[:streamBufferSize]
    	c0, c1 := c.ctr[0], c.ctr[1]
    	for i := 0; i < streamBufferSize; i += 16 {
    		byteorder.BePutUint64(c.buffer[i+0:], c0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  7. src/runtime/mcache.go

    		c = mcache0
    	} else {
    		c = pp.mcache
    	}
    	return c
    }
    
    // refill acquires a new span of span class spc for c. This span will
    // have at least one free object. The current span in c must be full.
    //
    // Must run in a non-preemptible context since otherwise the owner of
    // c could change.
    func (c *mcache) refill(spc spanClass) {
    	// Return the current cached span to the central lists.
    	s := c.alloc[spc]
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. src/runtime/rand.go

    		// so we don't need to use mp.locks
    		// on the fast path, which is that the
    		// first attempt succeeds.
    		x, ok := c.Next()
    		if ok {
    			return x
    		}
    		mp.locks++ // hold m even though c.Refill may do stack split checks
    		c.Refill()
    		mp.locks--
    	}
    }
    
    // mrandinit initializes the random state of an m.
    func mrandinit(mp *m) {
    	var seed [4]uint64
    	for i := range seed {
    		seed[i] = bootstrapRand()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. src/internal/chacha8rand/rand_test.go

    	var s State
    	s.Init(seed)
    	for i := range output {
    		for {
    			x, ok := s.Next()
    			if ok {
    				if x != output[i] {
    					t.Errorf("#%d: have %#x want %#x", i, x, output[i])
    				}
    				break
    			}
    			s.Refill()
    		}
    	}
    }
    
    func TestMarshal(t *testing.T) {
    	var s State
    	s.Init(seed)
    	for i := range output {
    		for {
    			b := Marshal(&s)
    			s = State{}
    			err := Unmarshal(&s, b)
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  10. plugin/pkg/admission/eventratelimit/admission_test.go

    			serverBurst: 3,
    			requests: []request{
    				newEventRequest(),
    				newEventRequest(),
    				newNonEventRequest(),
    				newEventRequest(),
    			},
    		},
    		{
    			name:        "event accepted after token refill",
    			serverBurst: 3,
    			requests: []request{
    				newEventRequest(),
    				newEventRequest(),
    				newEventRequest(),
    				newEventRequest().blocked(),
    				newEventRequest().withDelay(1),
    			},
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 17 13:19:08 UTC 2021
    - 15.6K bytes
    - Viewed (0)
Back to top