rlimit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: MIT Imports: 4 Imported by: 5

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
}

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