Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for from (0.14 sec)

  1. src/arena/arena.go

    // Arenas are useful for improving efficiency as they may be freed back to
    // the runtime manually, though any memory obtained from freed arenas must
    // not be accessed once that happens. An Arena is automatically freed once
    // it is no longer referenced, so it must be kept alive (see runtime.KeepAlive)
    // until any memory allocated from it is no longer needed.
    //
    // An Arena must never be used concurrently by multiple goroutines.
    type Arena struct {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  2. src/cmd/cgo/doc.go

    containing debug information. Cgo parses the DWARF debug information
    for __cgo__N to learn the type of each identifier. (The types also
    distinguish functions from global variables.) Cgo reads the constant
    values from the __cgodebug_* from the object file's data segment.
    
    At this point cgo knows the meaning of each C.xxx well enough to start
    the translation process.
    
    Translating Go
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/swig/testdata/callback/main.go

    	c.SetCallback(cb)
    	s := c.Call()
    	if s != "Callback::run" {
    		fatal("unexpected string from Call: %q", s)
    	}
    	c.DelCallback()
    }
    
    func testCallback() {
    	c := NewCaller()
    	cb := NewDirectorCallback(&GoCallback{})
    	c.SetCallback(cb)
    	s := c.Call()
    	if s != "GoCallback.Run" {
    		fatal("unexpected string from Call with callback: %q", s)
    	}
    	c.DelCallback()
    	DeleteDirectorCallback(cb)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 1K bytes
    - Viewed (0)
  4. src/cmd/cgo/ast.go

    		}
    		fatalf("parsing %s: %s", name, err)
    	}
    	return ast1
    }
    
    func sourceLine(n ast.Node) int {
    	return fset.Position(n.Pos()).Line
    }
    
    // ParseGo populates f with information learned from the Go source code
    // which was read from the named file. It gathers the C preamble
    // attached to the import "C" comment, a list of references to C.xxx,
    // a list of exported functions, and the actual AST, to be rewritten and
    // printed.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  5. src/bytes/buffer_test.go

    			buf.WriteRune(r)
    		}
    	}
    }
    
    // From Issue 5154.
    func BenchmarkBufferNotEmptyWriteRead(b *testing.B) {
    	buf := make([]byte, 1024)
    	for i := 0; i < b.N; i++ {
    		var b Buffer
    		b.Write(buf[0:1])
    		for i := 0; i < 5<<10; i++ {
    			b.Write(buf)
    			b.Read(buf)
    		}
    	}
    }
    
    // Check that we don't compact too often. From Issue 5154.
    func BenchmarkBufferFullSmallReads(b *testing.B) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  6. src/bufio/bufio_test.go

    	tests := []struct {
    		name     string
    		r        io.Reader
    		bufSize  int // 0 means 16
    		peekSize int
    
    		n int // input to Discard
    
    		want    int   // from Discard
    		wantErr error // from Discard
    
    		wantBuffered int
    	}{
    		{
    			name:         "normal case",
    			r:            strings.NewReader("abcdefghijklmnopqrstuvwxyz"),
    			peekSize:     16,
    			n:            6,
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  7. src/cmd/api/testdata/src/pkg/p1/p1.go

    	// Deprecated: use B.
    	A         = 1
    	a         = 11
    	A64 int64 = 1
    
    	AIsLowerA = a // previously declared
    )
    
    const (
    	ConversionConst = MyInt(5)
    )
    
    // Variables from function calls.
    var (
    	V = ptwo.F()
    	// Deprecated: use WError.
    	VError = BarE()
    	V1     = Bar1(1, 2, 3)
    	V2     = ptwo.G()
    )
    
    // Variables with conversions:
    var (
    	StrConv  = string("foo")
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Dec 02 16:29:41 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/issue18146.go

    		nproc = 7
    	}
    	if setNproc {
    		var rlim syscall.Rlimit
    		if syscall.Getrlimit(nproc, &rlim) == nil {
    			max := int(rlim.Cur) / (threads + 5)
    			if attempts > max {
    				t.Logf("lowering attempts from %d to %d for RLIMIT_NPROC", attempts, max)
    				attempts = max
    			}
    		}
    	}
    
    	if os.Getenv("test18146") == "exec" {
    		runtime.GOMAXPROCS(1)
    		for n := threads; n > 0; n-- {
    			go func() {
    				for {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Sep 05 23:35:32 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/archive/zip/register.go

    // The Compressor itself must be safe to invoke from multiple goroutines
    // simultaneously, but each returned writer will be used only by
    // one goroutine at a time.
    type Compressor func(w io.Writer) (io.WriteCloser, error)
    
    // A Decompressor returns a new decompressing reader, reading from r.
    // The [io.ReadCloser]'s Close method must be used to release associated resources.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  10. src/bytes/buffer.go

    )
    
    // ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer.
    var ErrTooLarge = errors.New("bytes.Buffer: too large")
    var errNegativeRead = errors.New("bytes.Buffer: reader returned negative count from Read")
    
    const maxInt = int(^uint(0) >> 1)
    
    // Bytes returns a slice of length b.Len() holding the unread portion of the buffer.
    // The slice is valid for use only until the next buffer modification (that is,
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
Back to top