syscallx

package
v3.0.0-...-7ba4d6b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 2 Imported by: 0

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

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