rlimit

package
v0.0.0-...-c269f4c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package rlimit provides data structure for resource limits by setrlimit syscall on linux.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RLimit

type RLimit struct {
	// Res is the resource type (e.g. syscall.RLIMIT_CPU)
	Res int
	// Rlim is the limit applied to that resource
	Rlim syscall.Rlimit
}

RLimit is the resource limits defined by Linux setrlimit

func (RLimit) String

func (r RLimit) String() string

type RLimits

type RLimits struct {
	CPU          uint64 // in s
	CPUHard      uint64 // in s
	Data         uint64 // in bytes
	FileSize     uint64 // in bytes
	Stack        uint64 // in bytes
	AddressSpace uint64 // in bytes
	OpenFile     uint64 // count
	DisableCore  bool   // set core to 0
}

RLimits defines the rlimit applied by setrlimit syscall to traced process

func (*RLimits) PrepareRLimit

func (r *RLimits) PrepareRLimit() []RLimit

PrepareRLimit creates rlimit structures for tracee TimeLimit in s, SizeLimit in byte

func (RLimits) String

func (r RLimits) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL