Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for allocated (0.26 sec)

  1. src/arena/arena.go

    	return sl[:len]
    }
    
    // Clone makes a shallow copy of the input value that is no longer bound to any
    // arena it may have been allocated from, returning the copy. If it was not
    // allocated from an arena, it is returned untouched. This function is useful
    // to more easily let an arena-allocated value out-live its arena.
    // T must be a pointer, a slice, or a string, otherwise this function will panic.
    func Clone[T any](s T) T {
    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)
  2. src/cmd/cgo/doc.go

    In this section the term Go pointer means a pointer to memory
    allocated by Go (such as by using the & operator or calling the
    predefined new function) and the term C pointer means a pointer to
    memory allocated by C (such as by a call to C.malloc). Whether a
    pointer is a Go pointer or a C pointer is a dynamic property
    determined by how the memory was allocated; 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)
  3. doc/go1.17_spec.html

              []T              slice capacity
              chan T           channel buffer capacity
    </pre>
    
    <p>
    The capacity of a slice is the number of elements for which there is
    space allocated in the underlying array.
    At any time the following relationship holds:
    </p>
    
    <pre>
    0 &lt;= len(s) &lt;= cap(s)
    </pre>
    
    <p>
    The length of a <code>nil</code> slice, map or channel is 0.
    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)
  4. src/cmd/cgo/internal/test/callback_c_gc.c

    #include <stdio.h>
    #include <stdlib.h>
    
    /* Test calling panic from C.  This is what SWIG does.  */
    
    extern void crosscall2(void (*fn)(void *, int), void *, int);
    extern void _cgo_panic(void *, int);
    extern void _cgo_allocate(void *, int);
    
    void
    callPanic(void)
    {
    	struct { const char *p; } a;
    	a.p = "panic from C";
    	crosscall2(_cgo_panic, &a, sizeof a);
    	*(int*)1 = 1;
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 592 bytes
    - Viewed (0)
  5. src/builtin/builtin.go

    //	length. For example, make([]int, 0, 10) allocates an underlying array
    //	of size 10 and returns a slice of length 0 and capacity 10 that is
    //	backed by this underlying array.
    //	Map: An empty map is allocated with enough space to hold the
    //	specified number of elements. The size may be omitted, in which case
    //	a small starting size is allocated.
    //	Channel: The channel's buffer is initialized with the specified
    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)
  6. src/archive/zip/reader_test.go

    		t.Errorf("Error opening file: %v", err)
    	}
    }
    
    func TestCVE202133196(t *testing.T) {
    	// Archive that indicates it has 1 << 128 -1 files,
    	// this would previously cause a panic due to attempting
    	// to allocate a slice with 1 << 128 -1 elements.
    	data := []byte{
    		0x50, 0x4b, 0x03, 0x04, 0x14, 0x00, 0x08, 0x08,
    		0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    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)
  7. src/bytes/buffer.go

    // total space allocated for the buffer's data.
    func (b *Buffer) Cap() int { return cap(b.buf) }
    
    // Available returns how many bytes are unused in the buffer.
    func (b *Buffer) Available() int { return cap(b.buf) - len(b.buf) }
    
    // Truncate discards all but the first n unread bytes from the buffer
    // but continues to use the same allocated storage.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  8. src/bufio/scan.go

    // by a subsequent call to Scan. It does no allocation.
    func (s *Scanner) Bytes() []byte {
    	return s.token
    }
    
    // Text returns the most recent token generated by a call to [Scanner.Scan]
    // as a newly allocated string holding its bytes.
    func (s *Scanner) Text() string {
    	return string(s.token)
    }
    
    // ErrFinalToken is a special sentinel error value. It is intended to be
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  9. doc/asm.html

    but assembly programs must define it explicitly.
    </p>
    
    <p>
    A data symbol marked with the <code>NOPTR</code> flag (see above)
    is treated as containing no pointers to runtime-allocated data.
    A data symbol with the <code>RODATA</code> flag
    is allocated in read-only memory and is therefore treated
    as implicitly marked <code>NOPTR</code>.
    A data symbol with a total size smaller than a pointer
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Nov 28 19:15:27 GMT 2023
    - 36.3K bytes
    - Viewed (0)
  10. doc/go_spec.html

    corresponds to the type argument with which <code>P</code> was
    <a href="#Instantiations">instantiated</a>.
    </p>
    
    <p>
    The capacity of a slice is the number of elements for which there is
    space allocated in the underlying array.
    At any time the following relationship holds:
    </p>
    
    <pre>
    0 &lt;= len(s) &lt;= cap(s)
    </pre>
    
    <p>
    The length of a <code>nil</code> slice, map or channel is 0.
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 00:39:16 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top