syscallx

package
v2.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0, BSD-3-Clause, MIT Imports: 2 Imported by: 4

Documentation

Overview

Package syscallx provides system call utilities that attempt to hide platform differences. Operations return ErrUnsupported if not implemented on the given platform. Consumers of this package should generally treat that error specially.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("not supported on platform")

ErrUnsupported is the error returned for unsupported operations.

Functions

func FreeDiskSpace

func FreeDiskSpace(path string) (uint64, error)

FreeDiskSpace returns the free disk space for a given path.

func PhysicalMemorySize

func PhysicalMemorySize() (uint64, error)

PhysicalMemorySize returns the total physical memory size.

func SetProcessMemoryCeiling added in v2.41.0

func SetProcessMemoryCeiling(softCeiling, hardCeiling uint64) error

SetProcessMemoryCeiling sets current and max process memory limit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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