Commit Graph

11 Commits (2f14062364b00090f0d93ad757a3f5e769c19342)

Author SHA1 Message Date
shirou 930a873984 [mem][linux]: add ExLinux on mem package and move VirtualMemoryEx info on it
shirou bc060cc227 add SPDX License, remove old build tag, and replace import
Kevin Conaway 7f4efa5358 Add support for reading AnonHugePages from /proc/meminfo
This commit adds support for reading the `AnonHugePages` field from `/proc/meminfo`.

The values in this field allow monitoring the [THP](https://www.kernel.org/doc/Documentation/vm/transhuge.txt) usage by systems that use this type of memory
Antoine Toulme 38b94668ea allow to pass context values to override environment variables
Eng Zer Jun 37894e9b28
test: use `T.Setenv` to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
quanweiZhou ddaf2d7623 [mem][linux] added additional meminfo fields
support HugePages_Rsvd, HugePages_Surp

Signed-off-by: quanweiZhou <quanweiZhou@linux.alibaba.com>
mmorel-35 1e6b445a8a gofumpt
shirou 0969c9436b delete v2 directory, move v3 to top #1078
Tom Barker 84a665b712 Add mem.SwapDevices() method.
Lomanic cd25417bd7 [mem][linux] Fix #1002 only try to parse /proc/meminfo numeric values on fields we're interested in
Lomanic 07887a9e9f [mem][linux] Add mocked test for VirtualMemory() and fix SReclaimable SUnreclaim retrieval