summaryrefslogtreecommitdiff
path: root/vendor/github.com/pbnjay/memory/README.md
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-01-22 09:35:23 +0000
committerLibravatar GitHub <noreply@github.com>2024-01-22 09:35:23 +0000
commita858831387f5e423c855ff3c5611fc80209f44b0 (patch)
tree059dcfc37228670e1e2aa20db4a36bb3cef40ef6 /vendor/github.com/pbnjay/memory/README.md
parent[bugfix] fix array type for also_known_as_uris (#2553) (diff)
downloadgotosocial-a858831387f5e423c855ff3c5611fc80209f44b0.tar.xz
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.4.0 to 0.5.0 (#2560)
Diffstat (limited to 'vendor/github.com/pbnjay/memory/README.md')
-rw-r--r--vendor/github.com/pbnjay/memory/README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/vendor/github.com/pbnjay/memory/README.md b/vendor/github.com/pbnjay/memory/README.md
new file mode 100644
index 000000000..e98f261a0
--- /dev/null
+++ b/vendor/github.com/pbnjay/memory/README.md
@@ -0,0 +1,41 @@
+# memory
+
+Package `memory` provides two methods reporting total physical system memory
+accessible to the kernel, and free memory available to the running application.
+
+This package has no external dependency besides the standard library and default operating system tools.
+
+Documentation:
+[![GoDoc](https://godoc.org/github.com/pbnjay/memory?status.svg)](https://godoc.org/github.com/pbnjay/memory)
+
+This is useful for dynamic code to minimize thrashing and other contention, similar to the stdlib `runtime.NumCPU`
+See some history of the proposal at https://github.com/golang/go/issues/21816
+
+
+## Example
+
+```go
+fmt.Printf("Total system memory: %d\n", memory.TotalMemory())
+fmt.Printf("Free memory: %d\n", memory.FreeMemory())
+```
+
+
+## Testing
+
+Tested/working on:
+ - macOS 10.12.6 (16G29), 10.15.7 (19H2)
+ - Windows 10 1511 (10586.1045)
+ - Linux RHEL (3.10.0-327.3.1.el7.x86_64)
+ - Raspberry Pi 3 (ARMv8) on Raspbian, ODROID-C1+ (ARMv7) on Ubuntu, C.H.I.P
+ (ARMv7).
+ - Amazon Linux 2 aarch64 (m6a.large, 4.14.203-156.332.amzn2.aarch64)
+
+Tested on virtual machines:
+ - Windows 7 SP1 386
+ - Debian stretch 386
+ - NetBSD 7.1 amd64 + 386
+ - OpenBSD 6.1 amd64 + 386
+ - FreeBSD 11.1 amd64 + 386
+ - DragonFly BSD 4.8.1 amd64
+
+If you have access to untested systems please test and report success/bugs.