Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for collect (0.18 sec)

  1. doc/next/6-stdlib/1-time.md

    become eligible for garbage collection immediately, even if their
    `Stop` methods have not been called.
    Earlier versions of Go did not collect unstopped `Timer`s until after
    they had fired and never collected unstopped `Ticker`s.
    
    Second, the timer channel associated with a `Timer` or `Ticker` is
    now unbuffered, with capacity 0.
    The main effect of this change is that Go now guarantees
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/flags/flags.go

    	objabi.AddVersionFlag() // -V
    	objabi.Flagcount("S", "print assembly and machine code", &PrintOut)
    }
    
    // MultiFlag allows setting a value multiple times to collect a list, as in -I=dir1 -I=dir2.
    type MultiFlag []string
    
    func (m *MultiFlag) String() string {
    	if len(*m) == 0 {
    		return ""
    	}
    	return fmt.Sprint(*m)
    }
    
    func (m *MultiFlag) Set(val string) error {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 22 19:18:23 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  3. src/cmd/cgo/doc.go

    duplicate symbols and the linker will fail. To avoid this, definitions
    must be placed in preambles in other files, or in C source files.
    
    # Passing pointers
    
    Go is a garbage collected language, and the garbage collector needs to
    know the location of every pointer to Go memory. Because of this,
    there are restrictions on passing pointers between Go and C.
    
    In this section the term Go pointer means a pointer to memory
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  4. src/arena/arena.go

    of this functionality is to improve efficiency: manually freeing memory
    before a garbage collection delays that cycle. Less frequent cycles means
    the CPU cost of the garbage collector is incurred less frequently.
    
    This functionality in this package is mostly captured in the Arena type.
    Arenas allocate large chunks of memory for Go values, so they're likely to
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  5. misc/wasm/wasm_exec.js

    				[0, 1],
    				[null, 2],
    				[true, 3],
    				[false, 4],
    				[globalThis, 5],
    				[this, 6],
    			]);
    			this._idPool = [];   // unused ids that have been garbage collected
    			this.exited = false; // whether the Go program has exited
    
    			// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.
    			let offset = 4096;
    
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon May 22 17:47:47 GMT 2023
    - 16.3K bytes
    - Viewed (1)
  6. src/bytes/buffer_test.go

    				buf.Write(yBytes)
    			})
    			// Check no allocation occurs in write, as long as we're single-threaded.
    			if allocs != 0 {
    				t.Errorf("allocation occurred during write")
    			}
    			// Check that buffer has correct data.
    			if !Equal(buf.Bytes()[0:startLen-readBytes], xBytes[readBytes:]) {
    				t.Errorf("bad initial data at %d %d", startLen, growLen)
    			}
    			if !Equal(buf.Bytes()[startLen-readBytes:startLen-readBytes+growLen], yBytes) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  7. src/archive/zip/reader_test.go

    	} else if size != f.UncompressedSize64 {
    		t.Errorf("%v: UncompressedSize=%#x does not match UncompressedSize64=%#x", f.Name, size, f.UncompressedSize64)
    	}
    
    	// Check that OpenRaw returns the correct byte segment
    	rw, err := f.OpenRaw()
    	if err != nil {
    		t.Errorf("%v: OpenRaw error=%v", f.Name, err)
    		return
    	}
    	start, err := f.DataOffset()
    	if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/asm/operand_test.go

    				}
    			}
    		})
    	}
    }
    
    type operandTest struct {
    	input, output string
    }
    
    type badOperandTest struct {
    	input, error string
    }
    
    // Examples collected by scanning all the assembly in the standard repo.
    
    var amd64OperandTests = []operandTest{
    	{"$(-1.0)", "$(-1.0)"},
    	{"$(0.0)", "$(0.0)"},
    	{"$(0x2000000+116)", "$33554548"},
    	{"$(0x3F<<7)", "$8064"},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  9. src/bufio/bufio_test.go

    		for j := 0; j < len(bufsizes); j++ {
    			nwrite := bufsizes[i]
    			bs := bufsizes[j]
    
    			// Write nwrite bytes using buffer size bs.
    			// Check that the right amount makes it out
    			// and that the data is correct.
    
    			w.Reset()
    			buf := NewWriterSize(w, bs)
    			context := fmt.Sprintf("nwrite=%d bufsize=%d", nwrite, bs)
    			n, e1 := buf.Write(data[0:nwrite])
    			if e1 != nil || n != nwrite {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/callback.go

    		}
    	}()
    	nestedCall(func() { panic("callback panic") })
    	panic("nestedCall returned")
    }
    
    // Callback with zero arguments used to make the stack misaligned,
    // which broke the garbage collector and other things.
    func testZeroArgCallback(t *testing.T) {
    	defer func() {
    		s := recover()
    		if s != nil {
    			t.Fatal("panic during callback:", s)
    		}
    	}()
    	C.callGoFoo()
    }
    
    //export goFoo
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 111.5K bytes
    - Viewed (0)
Back to top