- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 201 for sizeOf (2.54 sec)
-
cmd/os_unix.go
dirent := (*syscall.Dirent)(unsafe.Pointer(&buf[0])) if v := unsafe.Offsetof(dirent.Reclen) + unsafe.Sizeof(dirent.Reclen); uintptr(len(buf)) < v { return consumed, nil, typ, fmt.Errorf("buf size of %d smaller than dirent header size %d", len(buf), v) } if len(buf) < int(dirent.Reclen) { return consumed, nil, typ, fmt.Errorf("buf size %d < record length %d", len(buf), dirent.Reclen) } consumed = int(dirent.Reclen)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 9.3K bytes - Viewed (0) -
cmd/os-dirent_namelen_linux.go
package cmd import ( "bytes" "fmt" "syscall" "unsafe" ) func direntNamlen(dirent *syscall.Dirent) (uint64, error) { const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name)) nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0])) const nameBufLen = uint16(len(nameBuf)) limit := dirent.Reclen - fixedHdr if limit > nameBufLen { limit = nameBufLen } // Avoid bugs in long file names
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Aug 19 01:35:22 GMT 2021 - 1.5K bytes - Viewed (0) -
src/archive/zip/writer.go
// if modification time is the only timestamp being encoded. var mbuf [9]byte // 2*SizeOf(uint16) + SizeOf(uint8) + SizeOf(uint32) mt := uint32(fh.Modified.Unix()) eb := writeBuf(mbuf[:]) eb.uint16(extTimeExtraID) eb.uint16(5) // Size: SizeOf(uint8) + SizeOf(uint32) eb.uint8(1) // Flags: ModTime eb.uint32(mt) // ModTime fh.Extra = append(fh.Extra, mbuf[:]...) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 04 14:28:57 GMT 2024 - 19.3K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue1435.go
// pthread_mutex_lock(&mu); // done = all_done; // pthread_mutex_unlock(&mu); // } // return NULL; // } // // void trial(int argc) { // int i; // nts = argc; // t = calloc(nts, sizeof(pthread_t)); // pthread_mutex_init(&mu, NULL); // for (i = 0; i < nts; i++) { // pthread_create(&t[i], NULL, aFn, NULL); // } // } // // void cleanup(void) { // int i; // pthread_mutex_lock(&mu);
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Jul 28 21:31:41 GMT 2023 - 7.5K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
// the compiler is going to pad it by one (see issue 9401). // We can't permit that, because then the size of the Go // struct will not be the same as the size of the C struct. // Our only option in such a case is to remove the field, // which means that it cannot be referenced from Go. for off > 0 && sizes[len(sizes)-1] == 0 { n := len(sizes) fld = fld[0 : n-1] sizes = sizes[0 : n-1]
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0) -
src/cmd/cgo/doc.go
struct_, union_, or enum_, as in C.struct_stat. The size of any C type T is available as C.sizeof_T, as in C.sizeof_struct_stat. A C function may be declared in the Go file with a parameter type of the special name _GoString_. This function may be called with an ordinary Go string value. The string length, and a pointer to the string contents, may be accessed by calling the C functions size_t _GoStringLen(_GoString_ s);
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) -
cmd/endpoint-ellipses.go
setIndexes [][]uint64 // All the sets. } // Supported set sizes this is used to find the optimal // single set size. var setSizes = []uint64{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} // getDivisibleSize - returns a greatest common divisor of // all the ellipses sizes. func getDivisibleSize(totalSizes []uint64) (result uint64) { gcd := func(x, y uint64) uint64 { for y != 0 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri May 03 15:54:03 GMT 2024 - 14.7K bytes - Viewed (0) -
cmd/object-api-datatypes.go
// Name of the bucket. Bucket string // Name of the object. Name string // Date and time when the object was last modified. ModTime time.Time // Total object size. Size int64 // Actual size is the real size of the object uploaded by client. ActualSize *int64 // IsDir indicates if the object is prefix. IsDir bool // Hex encoded unique entity tag of the object. ETag string
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 20.8K bytes - Viewed (0) -
src/archive/zip/reader.go
func NewReader(r io.ReaderAt, size int64) (*Reader, error) { if size < 0 { return nil, errors.New("zip: size cannot be negative") } zr := new(Reader) var err error if err = zr.init(r, size); err != nil && err != ErrInsecurePath { return nil, err } return zr, err } func (r *Reader) init(rdr io.ReaderAt, size int64) error { end, baseOffset, err := readDirectoryEnd(rdr, size)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
src/bytes/bytes_test.go
} func TestEqualExhaustive(t *testing.T) { var size = 128 if testing.Short() { size = 32 } a := make([]byte, size) b := make([]byte, size) b_init := make([]byte, size) // randomish but deterministic data for i := 0; i < size; i++ { a[i] = byte(17 * i) b_init[i] = byte(23*i + 100) } for len := 0; len <= size; len++ { for x := 0; x <= size-len; x++ { for y := 0; y <= size-len; y++ {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0)