Documentation
¶
Index ¶
- Constants
- func Breakpoint()
- func Caller(skip int) (pc uintptr, file string, line int, ok bool)
- func Callers(skip int, pc []uintptr) int
- func GOMAXPROCS(n int) int
- func GOROOT() string
- func Goexit()
- func KeepAlive(x interface{})
- func LockOSThread()
- func NumCgoCall() int
- func NumGoroutine() int
- func Stack(buf []byte, all bool) int
- func UnlockOSThread()
- func Version() string
- type Error
- type Frame
- type Frames
- type Func
- type MemStats
Constants ¶
const Compiler = "tinygo"
const GOARCH = "amd64"
const GOOS = "linux"
const TargetBits = 64
The bitness of the CPU (e.g. 8, 32, 64).
Variables ¶
This section is empty.
Functions ¶
func GOMAXPROCS ¶
func Goexit ¶ added in v0.9.0
func Goexit()
Goexit terminates the currently running goroutine. No other goroutines are affected.
func KeepAlive ¶ added in v0.27.0
func KeepAlive(x interface{})
KeepAlive makes sure the value in the interface is alive until at least the point of the call.
func LockOSThread ¶ added in v0.23.0
func LockOSThread()
LockOSThread wires the calling goroutine to its current operating system thread. Stub for now Called by go1.18 standard library on windows, see https://github.com/golang/go/issues/49320
func NumCgoCall ¶ added in v0.23.0
func NumCgoCall() int
Stub for NumCgoCall, does not return the real value
func NumGoroutine ¶ added in v0.23.0
func NumGoroutine() int
Stub for NumGoroutine, does not return the real value
func UnlockOSThread ¶ added in v0.23.0
func UnlockOSThread()
UnlockOSThread undoes an earlier call to LockOSThread. Stub for now
Types ¶
type Error ¶ added in v0.14.0
type Error interface { error RuntimeError() }
The Error interface identifies a run time error.
type MemStats ¶ added in v0.26.0
type MemStats struct { // Alloc is bytes of allocated heap objects. // // This is the same as HeapAlloc (see below). Alloc uint64 // Sys is the total bytes of memory obtained from the OS. // // Sys is the sum of the XSys fields below. Sys measures the // address space reserved by the runtime for the // heap, stacks, and other internal data structures. Sys uint64 // HeapAlloc is bytes of allocated heap objects. // // "Allocated" heap objects include all reachable objects, as // well as unreachable objects that the garbage collector has // not yet freed. Specifically, HeapAlloc increases as heap // objects are allocated and decreases as the heap is swept // and unreachable objects are freed. Sweeping occurs // incrementally between GC cycles, so these two processes // occur simultaneously, and as a result HeapAlloc tends to // change smoothly (in contrast with the sawtooth that is // typical of stop-the-world garbage collectors). HeapAlloc uint64 // HeapSys is bytes of heap memory, total. // // In TinyGo unlike upstream Go, we make no distinction between // regular heap blocks used by escaped-to-the-heap variables and // blocks occupied by goroutine stacks, // all such blocks are marked as in-use, see HeapInuse below. HeapSys uint64 // HeapIdle is bytes in idle (unused) blocks. HeapIdle uint64 // HeapInuse is bytes in in-use blocks. HeapInuse uint64 // HeapReleased is bytes of physical memory returned to the OS. HeapReleased uint64 // TotalAlloc is cumulative bytes allocated for heap objects. // // TotalAlloc increases as heap objects are allocated, but // unlike Alloc and HeapAlloc, it does not decrease when // objects are freed. TotalAlloc uint64 // Mallocs is the cumulative count of heap objects allocated. // The number of live objects is Mallocs - Frees. Mallocs uint64 // Frees is the cumulative count of heap objects freed. Frees uint64 // GCSys is bytes of memory in garbage collection metadata. GCSys uint64 }
A MemStats records statistics about the memory allocator.
Source Files
¶
- algorithm.go
- arch-has-returnaddr.go
- arch_amd64.go
- build_noasserts.go
- chan.go
- complex.go
- coro.go
- debug.go
- defer.go
- env.go
- env_unix.go
- error.go
- extern.go
- float.go
- hashmap.go
- hosted.go
- interface.go
- memhash_fnv.go
- metrics.go
- mstats.go
- os_linux.go
- panic.go
- poll.go
- print.go
- proc.go
- runtime.go
- runtime_unix.go
- scheduler.go
- slice.go
- stack.go
- string.go
- symtab.go
- sync.go
- synctest.go
- time.go
- time_go123.go
Directories
¶
Path | Synopsis |
---|---|
Package debug is a very partially implemented package to allow compilation.
|
Package debug is a very partially implemented package to allow compilation. |
internal
|
|
Package interrupt provides access to hardware interrupts.
|
Package interrupt provides access to hardware interrupts. |
Stubs for the runtime/trace package
|
Stubs for the runtime/trace package |
Package volatile provides definitions for volatile loads and stores.
|
Package volatile provides definitions for volatile loads and stores. |