François Revol
01f400c15f
Haiku: minimal implementation ( #1538 )
2025-02-05 09:08:28 +08:00
carterli
fc969b01c7
Memory (NetBSD): change formula to be consistant with other systems
2025-01-13 10:47:25 +08:00
carterli
41e22ea866
Memory (OpenBSD): update formula to be consistant with other systems
2025-01-13 10:47:25 +08:00
Carter Li
e7630aef34
NetBSD: support CPUUsage / Memory / Swap
2024-10-28 16:10:20 +08:00
李通洲
4665fdd145
Global: make it compile on NetBSD
...
Doesn't work yet.
2024-10-27 11:43:36 +08:00
李通洲
b257134d74
Chore: introduce macro ARRAY_SIZE
2024-10-18 16:44:41 +08:00
李通洲
cd9cfa5d99
Memory (SunOS): simplify
2024-10-11 14:48:56 +08:00
李通洲
ded38efb1a
Memory (OpenBSD): fix detection of used memory size
...
Fix #1331
2024-10-11 14:48:11 +08:00
apocelipes
84cc9e3b15
Chore: fix some unused paramater/function warnings ( #1324 )
2024-10-06 23:01:49 +08:00
Carter Li
a32d9d788c
OpenBSD: init platform support
2024-10-04 17:49:18 +08:00
Carter Li
a749014e7c
Kernel: code refactor
2024-07-02 10:47:14 +08:00
Carter Li
72d332772d
SunOS: support memory usage detection
2024-06-17 15:52:45 +08:00
Carter Li
d35490aeef
Fastfetch: make it compile on SunOS
2024-06-16 01:02:48 +08:00
李通洲
e804dfc49e
Memory (macOS): align algo of memory usage counting to stats
...
Which seems to print the same result of neofetch
2023-12-14 16:13:05 +08:00
李通洲
a9c5c2892c
Memory (Linux): Use MemAvailable if available
2023-12-07 16:30:10 +08:00
apocelipes
1c24cb3ebb
refactor: simplify parsing
2023-12-04 19:47:34 +08:00
apocelipes
6eae425679
fix(Memory): fix reading procfs files and simplify data parsing
...
Files in procfs are always changed by kernel.
It means if we read the data with more than one read syscall,
we could get an incorrect data which was broken by kernel.
A typical case about this problem was reported by psutil in
https://github.com/giampaolo/psutil/issues/2050
Using an big buffer let read reads the whole file can fix this.
psutil uses a 32K buffer while procps-ng uses a 8K buffer, i think a 8K buffer is enough.
2023-12-04 19:47:34 +08:00
李通洲
f63f31db0a
Memory (Linux): fix compiler warnings
2023-11-25 19:40:36 +08:00
李通洲
96d60184d5
Memory (Linux): try improving performance
2023-11-24 10:12:34 +08:00
Marius Messerschmidt
6fe0eb5677
ClangTidy: avoid different parameter names for same function
2023-11-18 12:31:57 +01:00
李通洲
f9597eba39
Global: remove #ifndef FF_INCLUDED_* guards
2023-11-09 13:46:45 +08:00
李通洲
3e0d97db2e
Platform: detect system page size
2023-11-08 00:10:16 +08:00
李通洲
eb308e1861
Memory (BSD): fix building on 32-bit FreeBSD
...
fix #538
2023-08-25 08:47:16 +08:00
李通洲
a059c55f05
Memory (FreeBSD): count cached memory as free memory
...
As what neofetch did
2023-07-02 10:30:21 +08:00
李通洲
e837e1e1d1
Swap: split module code from memory.c
2023-05-11 22:03:18 +08:00
李通洲
725d2f2612
Windows: fix <Windows.h> header mess
2023-03-25 00:50:40 +08:00
李通洲
9a3909f8ba
Memory (Windows): check for error cases
2023-02-16 17:19:43 +08:00
李通洲
e2d145cf31
Memory (Apple): use sysctl instead of sysctlbyname
2023-02-14 17:31:07 +08:00
李通洲
6ff67e87eb
Memory: refactor, don't cache results
2022-12-28 17:20:20 +08:00
李通洲
19c5904561
Memory: improve performance by not querying WMI (Windows)
2022-11-21 15:45:53 +08:00
李通洲
581c6f547d
Swap: split code out from memory detection
...
1. Since swap module is disabled by default, swap detection is unnecessary in most cases.
2. On platform other than Linux, swap detection doesn't share code with memory.
3. Swap detection can be expensive. On Windows, it requires another WMI query which can lag heavily in some cases. Don't pay for you don't use.
2022-10-19 00:24:17 +08:00
李通洲
38b3aae1e3
Windows: simplify WMI query code
...
by making C++ code more C++
2022-10-17 00:17:26 +08:00
李通洲
3d2497f963
macOS: fix compile warnings
2022-10-11 19:19:43 +08:00
李通洲
0a55071f88
Memory: add support for Windows
2022-10-09 15:37:14 +08:00
Linus Dierheimer
b8656d5e12
Fix build on BSD
2022-09-29 12:24:00 +02:00
Linus Dierheimer
40588e1a39
Fix build on MacOS
...
#261
2022-09-29 11:35:59 +02:00
李通洲
3068b5bcb2
Memory: fix percentage calculation
2022-09-21 18:10:50 +08:00
Linus Dierheimer
01a917982c
Fix build on macos
2022-09-20 15:21:39 +02:00
Linus Dierheimer
a9cb178315
Better error messages for memory & swap
2022-09-20 15:12:24 +02:00
Linus Dierheimer
b8fc471678
Better BSD support
2022-09-20 11:16:08 +02:00
Linus Dierheimer
f0cee064bd
Basic BSD support
2022-09-19 23:16:43 +02:00
Linus Dierheimer
6bd933eba2
Enable BSD support in CMake
2022-09-19 22:23:31 +02:00
Linus Dierheimer
f3e6d04c8e
Fix build on macos the second
2022-09-19 21:45:39 +02:00
Linus Dierheimer
2a61d29be9
sysctl utils
2022-09-19 21:31:50 +02:00
Carter Li
8c6cf2ccda
Swap: add macOS support
2022-09-17 11:21:05 +08:00
Linus Dierheimer
be7f8f4117
Swap module
...
#225
2022-09-08 14:51:31 +02:00
Linus Dierheimer
a1fde6f922
MacOS memory support
2022-09-05 02:46:53 -07:00
Linus Dierheimer
6a44515cf2
Separate memory detection and printing logic
2022-09-05 10:57:09 +02:00