Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for avail (0.06 sec)

  1. internal/ringbuffer/ring_buffer.go

    }
    
    func (r *RingBuffer) write(p []byte) (n int, err error) {
    	if r.isFull {
    		return 0, ErrIsFull
    	}
    
    	var avail int
    	if r.w >= r.r {
    		avail = r.size - r.w + r.r
    	} else {
    		avail = r.r - r.w
    	}
    
    	if len(p) > avail {
    		err = ErrTooMuchDataToWrite
    		p = p[:avail]
    	}
    	n = len(p)
    
    	if r.w >= r.r {
    		c1 := r.size - r.w
    		if c1 >= n {
    			copy(r.buf[r.w:], p)
    			r.w += n
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/driver/html/stacks.js

      function fitText(t, avail, textList) {
        // Find first entry in textList that fits.
        let width = avail;
        textContext.font = FONT_SIZE + 'pt Arial';
        for (let i = 0; i < textList.length; i++) {
          let text = textList[i];
          width = textContext.measureText(text).width;
          if (width <= avail) {
            t.innerText = text;
            return;
          }
        }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/preflight/checks_test.go

    				rt.name,
    				rt.expectedError,
    				(output != nil),
    			)
    		}
    	}
    }
    
    func TestFileAvailableCheck(t *testing.T) {
    	f, err := os.CreateTemp("", "file-avail-check")
    	if err != nil {
    		t.Fatalf("Failed to create file: %v", err)
    	}
    	defer utiltesting.CloseAndRemove(t, f)
    	var tests = []struct {
    		name          string
    		check         FileAvailableCheck
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  4. src/runtime/stack.go

    	// current stack. The currently used stack includes everything
    	// down to the SP plus the stack guard space that ensures
    	// there's room for nosplit functions.
    	avail := gp.stack.hi - gp.stack.lo
    	if used := gp.stack.hi - gp.sched.sp + stackNosplit; used >= avail/4 {
    		return
    	}
    
    	if stackDebug > 0 {
    		print("shrinking stack ", oldsize, "->", newsize, "\n")
    	}
    
    	copystack(gp, newsize)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
Back to top