Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TICK time.Duration PAGESIZE int64 )
View Source
var ( OutOfTimeError = errors.New("out of time") OutOfMemoryError = errors.New("out of memory") )
Functions ¶
func GetResourceUsage ¶
func RunningTime ¶
Running returns process total running time from the start
func RuntimeError ¶
Types ¶
type Sandbox ¶
func NewStdSandbox ¶
type StdSandbox ¶
type StdSandbox struct {
Bin string // binary path
Args []string // arguments
Input io.Reader // standard input
TimeLimit int64 // time limit in ms
MemoryLimit int64 // memory limit in kb
// contains filtered or unexported fields
}
func (*StdSandbox) Memory ¶
func (s *StdSandbox) Memory() int64
func (*StdSandbox) Run ¶
func (s *StdSandbox) Run() ([]byte, error)
func (*StdSandbox) Time ¶
func (s *StdSandbox) Time() int64
Click to show internal directories.
Click to hide internal directories.