Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Page (0.19 sec)

  1. src/bytes/boundary_test.go

    package bytes_test
    
    import (
    	. "bytes"
    	"syscall"
    	"testing"
    )
    
    // This file tests the situation where byte operations are checking
    // data very near to a page boundary. We want to make sure those
    // operations do not read across the boundary and cause a page
    // fault where they shouldn't.
    
    // These tests run only on linux. The code being tested is
    // not OS-specific, so it does not need to be tested on all
    // operating systems.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 30 20:05:58 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  2. src/bytes/bytes_test.go

    			if pos != -1 {
    				t.Errorf("IndexByte(%q, 'x') = %v", b1, pos)
    			}
    		}
    	}
    }
    
    // test a small index across all page offsets
    func TestIndexByteSmall(t *testing.T) {
    	b := make([]byte, 5015) // bigger than a page
    	// Make sure we find the correct byte even when straddling a page.
    	for i := 0; i <= len(b)-15; i++ {
    		for j := 0; j < 15; j++ {
    			b[i+j] = byte(100 + j)
    		}
    		for j := 0; j < 15; j++ {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top