Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 267 for prlimit (0.24 sec)

  1. src/syscall/syscall_linux_test.go

    		origRlimitNofile.Store(&syscall.Rlimit{
    			Cur: 1024,
    			Max: 65536,
    		})
    	}
    
    	// Get current process's nofile limit
    	var lim syscall.Rlimit
    	if err := syscall.Prlimit(0, syscall.RLIMIT_NOFILE, nil, &lim); err != nil {
    		t.Fatalf("Failed to get the current nofile limit: %v", err)
    	}
    	// Set current process's nofile limit through prlimit
    	if err := syscall.Prlimit(0, syscall.RLIMIT_NOFILE, &lim, nil); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23K bytes
    - Viewed (0)
  2. src/syscall/syscall_linux_386.go

    	Max uint32
    }
    
    //sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
    
    const rlimInf32 = ^uint32(0)
    const rlimInf64 = ^uint64(0)
    
    func Getrlimit(resource int, rlim *Rlimit) (err error) {
    	err = prlimit(0, resource, nil, rlim)
    	if err != ENOSYS {
    		return err
    	}
    
    	rl := rlimit32{}
    	err = getrlimit(resource, &rl)
    	if err != nil {
    		return
    	}
    
    	if rl.Cur == rlimInf32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 22:23:07 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  3. src/syscall/syscall_linux.go

    //sys	Munlockall() (err error)
    
    // prlimit changes a resource limit. We use a single definition so that
    // we can tell StartProcess to not restore the original NOFILE limit.
    //
    // golang.org/x/sys linknames prlimit.
    // Do not remove or change the type signature.
    //
    //go:linkname prlimit
    func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
    	err = prlimit1(pid, resource, newlimit, old)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  4. pkg/kubelet/kuberuntime/kuberuntime_container_linux.go

    	if !isCgroup2UnifiedMode() {
    		if swapControllerAvailable() {
    			// memorySwapLimit = total permitted memory+swap; if equal to memory limit, => 0 swap above memory limit
    			// Some swapping is still possible.
    			// Note that if memory limit is 0, memory swap limit is ignored.
    			lcr.MemorySwapLimitInBytes = lcr.MemoryLimitInBytes
    		}
    		return
    	}
    
    	m.configureSwap(lcr, 0)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/container_manager_linux.go

    }
    
    func (cm *containerManagerImpl) SystemCgroupsLimit() v1.ResourceList {
    	cpuLimit := int64(0)
    
    	// Sum up resources of all external containers.
    	for _, cont := range cm.systemContainers {
    		cpuLimit += cont.cpuMillicores
    	}
    
    	return v1.ResourceList{
    		v1.ResourceCPU: *resource.NewMilliQuantity(
    			cpuLimit,
    			resource.DecimalSI),
    	}
    }
    
    func isProcessRunningInHost(pid int) (bool, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  6. src/runtime/testdata/testprog/gc.go

    	}
    	debug.SetGCPercent(gcPercent)
    
    	const myLimit = 256 << 20
    	if limit := debug.SetMemoryLimit(-1); limit != math.MaxInt64 {
    		print("expected MaxInt64 limit, got ", limit, " bytes instead\n")
    		return
    	}
    	if limit := debug.SetMemoryLimit(myLimit); limit != math.MaxInt64 {
    		print("expected MaxInt64 limit, got ", limit, " bytes instead\n")
    		return
    	}
    	if limit := debug.SetMemoryLimit(-1); limit != myLimit {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 12.1K bytes
    - Viewed (0)
  7. pkg/api/v1/resource/helpers_test.go

    )
    
    func TestResourceHelpers(t *testing.T) {
    	cpuLimit := resource.MustParse("10")
    	memoryLimit := resource.MustParse("10G")
    	resourceSpec := v1.ResourceRequirements{
    		Limits: v1.ResourceList{
    			v1.ResourceCPU:    cpuLimit,
    			v1.ResourceMemory: memoryLimit,
    		},
    	}
    	if res := resourceSpec.Limits.Cpu(); res.Cmp(cpuLimit) != 0 {
    		t.Errorf("expected cpulimit %v, got %v", cpuLimit, res)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 07 22:26:13 UTC 2023
    - 38.3K bytes
    - Viewed (0)
  8. pkg/apis/core/fuzzer/fuzzer.go

    		},
    		func(q *core.LimitRangeItem, c fuzz.Continue) {
    			var cpuLimit resource.Quantity
    			c.Fuzz(&cpuLimit)
    
    			q.Type = core.LimitTypeContainer
    			q.Default = make(core.ResourceList)
    			q.Default[core.ResourceCPU] = cpuLimit.DeepCopy()
    
    			q.DefaultRequest = make(core.ResourceList)
    			q.DefaultRequest[core.ResourceCPU] = cpuLimit.DeepCopy()
    
    			q.Max = make(core.ResourceList)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  9. src/internal/trace/oldtrace.go

    	copy(mappedArgs[:], ev.Args[:])
    
    	switch ev.Type {
    	case oldtrace.EvGomaxprocs:
    		mappedType = go122.EvProcsChange
    		if it.preInit {
    			// The first EvGomaxprocs signals the end of trace initialization. At this point we've seen
    			// all goroutines that already existed at trace begin.
    			it.preInit = false
    			for gid := range it.createdPreInit {
    				// These are goroutines that already existed when tracing started but for which we
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/cgroup_manager_linux.go

    			cpuLimitAndPeriod, cgroupPath, errScan)
    	}
    	cpuLimit := int64(-1)
    	if cpuLimitStr != Cgroup2MaxCpuLimit {
    		cpuLimit, err = strconv.ParseInt(cpuLimitStr, 10, 64)
    		if err != nil {
    			return nil, fmt.Errorf("failed to convert CPU limit as integer for cgroup %v: %v", cgroupPath, err)
    		}
    	}
    	cpuPeriod, errPeriod := strconv.ParseUint(cpuPeriodStr, 10, 64)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 26.5K bytes
    - Viewed (0)
Back to top