Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for mib (0.19 sec)

  1. src/runtime/os_openbsd.go

    )
    
    func sysctlInt(mib []uint32) (int32, bool) {
    	var out int32
    	nout := unsafe.Sizeof(out)
    	ret := sysctl(&mib[0], uint32(len(mib)), (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
    	if ret < 0 {
    		return 0, false
    	}
    	return out, true
    }
    
    func sysctlUint64(mib []uint32) (uint64, bool) {
    	var out uint64
    	nout := unsafe.Sizeof(out)
    	ret := sysctl(&mib[0], uint32(len(mib)), (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/sys/unix/syscall_freebsd.go

    	}
    
    	mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
    	n = unsafe.Sizeof(uname.Nodename)
    	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
    		return err
    	}
    
    	mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
    	n = unsafe.Sizeof(uname.Release)
    	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
    		return err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 05:26:45 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  3. cmd/batch-job-common-types_test.go

    				UpperBound: 10 << 20,
    				LowerBound: 1 << 20,
    			},
    			want: true,
    		},
    		{
    			// 2KiB < 1 MiB -> out of range from left
    			objSize: 2 << 10,
    			sizeFilter: BatchJobSizeFilter{
    				UpperBound: 10 << 20,
    				LowerBound: 1 << 20,
    			},
    			want: false,
    		},
    		{
    			// 11MiB > 10 MiB -> out of range from right
    			objSize: 11 << 20,
    			sizeFilter: BatchJobSizeFilter{
    				UpperBound: 10 << 20,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jan 08 23:22:28 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. src/runtime/os_netbsd.go

    const (
    	_CTL_KERN   = 1
    	_KERN_OSREV = 3
    
    	_CTL_HW        = 6
    	_HW_NCPU       = 3
    	_HW_PAGESIZE   = 7
    	_HW_NCPUONLINE = 16
    )
    
    func sysctlInt(mib []uint32) (int32, bool) {
    	var out int32
    	nout := unsafe.Sizeof(out)
    	ret := sysctl(&mib[0], uint32(len(mib)), (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
    	if ret < 0 {
    		return 0, false
    	}
    	return out, true
    }
    
    func getncpu() int32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  5. src/syscall/route_bsd.go

    func RouteRIB(facility, param int) ([]byte, error) {
    	mib := []_C_int{CTL_NET, AF_ROUTE, 0, 0, _C_int(facility), _C_int(param)}
    	// Find size.
    	n := uintptr(0)
    	if err := sysctl(mib, nil, &n, nil, 0); err != nil {
    		return nil, err
    	}
    	if n == 0 {
    		return nil, nil
    	}
    	tab := make([]byte, n)
    	if err := sysctl(mib, &tab[0], &n, nil, 0); err != nil {
    		return nil, err
    	}
    	return tab[:n], nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. src/runtime/sys_openbsd2.go

    }
    
    //go:nosplit
    //go:cgo_unsafe_args
    func sysctl(mib *uint32, miblen uint32, out *byte, size *uintptr, dst *byte, ndst uintptr) int32 {
    	ret := libcCall(unsafe.Pointer(abi.FuncPCABI0(sysctl_trampoline)), unsafe.Pointer(&mib))
    	KeepAlive(mib)
    	KeepAlive(out)
    	KeepAlive(size)
    	KeepAlive(dst)
    	return ret
    }
    func sysctl_trampoline()
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. src/cmd/trace/main.go

    // json output (the trace viewer can hardly handle more).
    func splitTrace(parsed *parsedTrace) ([]traceviewer.Range, error) {
    	// TODO(mknyszek): Split traces by generation by doing a quick first pass over the
    	// trace to identify all the generation boundaries.
    	s, c := traceviewer.SplittingTraceConsumer(100 << 20) // 100 MiB
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt

    import okhttp3.Request
    
    class CacheResponse(cacheDirectory: File) {
      private val client: OkHttpClient =
        OkHttpClient.Builder()
          .cache(
            Cache(
              directory = cacheDirectory,
              // 1 MiB.
              maxSize = 10L * 1024L * 1024L,
            ),
          )
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. src/syscall/syscall_darwin.go

    	Nlen   uint8
    	Alen   uint8
    	Slen   uint8
    	Data   [12]int8
    	raw    RawSockaddrDatalink
    }
    
    // Translate "kern.hostname" to []_C_int{0,1,2,3}.
    func nametomib(name string) (mib []_C_int, err error) {
    	const siz = unsafe.Sizeof(mib[0])
    
    	// NOTE(rsc): It seems strange to set the buffer to have
    	// size CTL_MAXNAME+2 but use only CTL_MAXNAME
    	// as the size. I don't know why the +2 is here, but the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. src/runtime/mranges.go

    	// would take ~160µs assuming a conservative copying rate of 25 GiB/s (the
    	// copy will almost never trigger a page fault) for a 1 TiB heap with 4 MiB
    	// arenas which is completely discontiguous. ~160µs is still a lot, but in
    	// practice most platforms have 64 MiB arenas (which cuts this by a factor
    	// of 16) and Go heaps are usually mostly contiguous, so the chance that
    	// an addrRanges even grows to that size is extremely low.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
Back to top