// RlimitStack reports the current stack size limit in bytes.
543358
func RlimitStack() (cur uint64, err error) {
	var r unix.Rlimit
	err = unix.Getrlimit(unix.RLIMIT_STACK, &r)
	return uint64(r.Cur), err // Type conversion because Cur is one of uint64, int64 depending on unix flavor.
}
1033886
func (s *DescribeSessionsInput) SetLimit(v int64) *DescribeSessionsInput {
	s.Limit = &v
	return s
}
1105409
func (d *DefaultLimitRangerActions) MutateLimit(limitRange *corev1.LimitRange, resourceName string, obj runtime.Object) error {
	switch resourceName {
	case "pods":
		return PodMutateLimitFunc(limitRange, obj.(*api.Pod))
	}
	return nil
}
855717
func jsonnet_max_stack(vmRef *C.struct_JsonnetVm, v C.uint) {
	vm := getVM(vmRef)
	vm.MaxStack = int(v) // potentially dangerous conversion
}
602621
func (s *ListMeshesInput) SetLimit(v int64) *ListMeshesInput {
	s.Limit = &v
	return s
}
839221
func (s *ListFileSharesInput) SetLimit(v int64) *ListFileSharesInput {
	s.Limit = &v
	return s
}
195816
func (s *ListScriptsInput) SetLimit(v int64) *ListScriptsInput {
	s.Limit = &v
	return s
}
1326402
func (s *DescribeGameSessionsInput) SetLimit(v int64) *DescribeGameSessionsInput {
	s.Limit = &v
	return s
}
975843
func (s *ListGatewaysInput) SetLimit(v int64) *ListGatewaysInput {
	s.Limit = &v
	return s
}
506332
func (s *UpdateStackOutput) SetStack(v *Stack) *UpdateStackOutput {
	s.Stack = v
	return s
}
970989
func (s *ListIPSetsInput) SetLimit(v int64) *ListIPSetsInput {
	s.Limit = &v
	return s
}
794958
func (s *ListVaultsInput) SetLimit(v string) *ListVaultsInput {
	s.Limit = &v
	return s
}
1352066
func (s *callStack) tailCallTrimStack() {
	for i := len(s.stack) - 1; i >= 0; i-- {
		if s.stack[i].isCall {
			if !s.stack[i].trimmable {
				return
			}
			// Remove this stack frame and everything above it
			s.stack = s.stack[:i]
			s.calls--
			return
		}
	}
}
92639
func (c *configuration) removeStack(i int) {
	c.stack = c.stack[:i+copy(c.stack[i:], c.stack[i+1:])]
}
320986
func (g *Group) TotalSizeLimit() int64 {
	g.mtx.Lock()
	defer g.mtx.Unlock()
	return g.totalSizeLimit
}
1174376
func (s *DescribeGroupsInput) SetLimit(v int64) *DescribeGroupsInput {
	s.Limit = &v
	return s
}
928770
func (bt backpressureTracker) currLimit() float64 {
	// Calculate k(U+F), converting to float64 first to avoid
	// overflow, although losing some precision in the process.
	usedFloat := float64(bt.used)
	freeFloat := float64(bt.free)
	limit := bt.limitFrac * (usedFloat + freeFloat)
	minLimit := math.Min(limit, float64(bt.limit))
	// Based on local tests, the magic number of 512 gets us past overflow
	// issues at the limit due to floating point precision.
	maxFloatForInt64 := float64(math.MaxInt64 - 512)
	if minLimit > maxFloatForInt64 {
		minLimit = maxFloatForInt64
	}
	return minLimit
}