File: sysutil.go

package info (click to toggle)
golang-github-gopherjs-gopherjs 0.0~git20170927.0.4152256-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,464 kB
  • sloc: cpp: 91; makefile: 7
file content (13 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
// +build !windows

// Package sysutil contains system-specific utilities.
package sysutil

import "golang.org/x/sys/unix"

// RlimitStack reports the current stack size limit in bytes.
func RlimitStack() (cur uint64, err error) {
	var r unix.Rlimit
	err = unix.Getrlimit(unix.RLIMIT_STACK, &r)
	return r.Cur, err
}