Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for memcpy (0.32 sec)

  1. src/cmd/cgo/internal/swig/testdata/stdio/main.swig

    /* A trivial example of wrapping a C library using SWIG.  */
    
    %{
    #include <stdio.h>
    #include <stdlib.h>
    %}
    
    %typemap(gotype) const char * "string"
    %typemap(in) const char * %{
    	$1 = malloc($input.n + 1);
    	memcpy($1, $input.p, $input.n);
    	$1[$input.n] = '\0';
    %}
    %typemap(freearg) const char * %{
    	free($1);
    %}
    
    FILE *fopen(const char *name, const char *mode);
    int fclose(FILE *);
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 563 bytes
    - Viewed (0)
  2. src/arena/arena.go

    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
    be inefficient for allocating only small amounts of small Go values. They're
    best used in bulk, on the order of MiB of memory allocated on each use.
    
    Note that by allowing for this limited form of manual memory allocation
    that use-after-free bugs are possible with regular Go values. This package
    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)
  3. src/cmd/cgo/doc.go

    All Go pointers passed to C must point to pinned Go memory. Go pointers
    passed as function arguments to C functions have the memory they point to
    implicitly pinned for the duration of the call. Go memory reachable from
    these function arguments must be pinned as long as the C code has access
    to it. Whether Go memory is pinned is a dynamic property of that memory
    region; it has nothing to do with the type of the pointer.
    
    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. misc/wasm/wasm_exec.js

    			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;
    
    			const strPtr = (str) => {
    				const ptr = offset;
    				const bytes = encoder.encode(str + "\0");
    				new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);
    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)
  5. doc/go1.17_spec.html

    which must be a slice, map or channel type,
    optionally followed by a type-specific list of expressions.
    It returns a value of type <code>T</code> (not <code>*T</code>).
    The memory is initialized as described in the section on
    <a href="#The_zero_value">initial values</a>.
    </p>
    
    <pre class="grammar">
    Call             Type T     Result
    
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/callback.go

    	// We do not do any explicit checks, just ensure that it does not crash.
    	for _, f := range splitTests {
    		f()
    	}
    }
    
    //export goStackCheck
    func goStackCheck() {
    	// use some stack memory to trigger split stack check
    	var buf [256]byte
    	use(buf[:])
    }
    
    var Used byte
    
    func use(buf []byte) {
    	for _, c := range buf {
    		Used += c
    	}
    }
    
    var splitTests = []func(){
    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)
  7. src/cmd/asm/internal/asm/testdata/amd64error.s

    	VFPCLASSSS.BCST $0, (AX), K2, K1 // ERROR "unsupported broadcast"
    	// Broadcast without memory operand.
    	VADDPD.BCST X3, X2, K1, X1       // ERROR "illegal broadcast without memory argument"
    	VADDPD.BCST X3, X2, K1, X1       // ERROR "illegal broadcast without memory argument"
    	VADDPD.BCST X3, X2, K1, X1       // ERROR "illegal broadcast without memory argument"
    	// CLWB instructions:
    	CLWB BX                          // ERROR "invalid instruction"
    Others
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 14 00:03:57 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  8. doc/next/6-stdlib/2-unique.md

    the value in the form of a `Handle[T]`.
    Two `Handle[T]` are equal if and only if the values used to produce the
    handles are equal, allowing programs to deduplicate values and reduce
    their memory footprint.
    Comparing two `Handle[T]` values is efficient, reducing down to a simple
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Apr 24 13:37:36 GMT 2024
    - 579 bytes
    - Viewed (0)
  9. src/builtin/builtin.go

    // If T is a floating-point type and any of the arguments are NaNs,
    // min will return NaN.
    func min[T cmp.Ordered](x T, y ...T) T
    
    // The new built-in function allocates memory. The first argument is a type,
    // not a value, and the value returned is a pointer to a newly
    // allocated zero value of that type.
    func new(Type) *Type
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/asm/parse.go

    //
    // It adds any labels to p.pendingLabels and returns the word, cond,
    // operand list, and true. If there is an error or EOF, it returns
    // ok=false.
    //
    // line may reuse the memory from scratch.
    func (p *Parser) line(scratch [][]lex.Token) (word, cond string, operands [][]lex.Token, ok bool) {
    next:
    	// Skip newlines.
    	var tok lex.ScanToken
    	for {
    		tok = p.nextToken()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
Back to top