我CONFIG_VMSPLIT_1G
在我的 32 位 Linux 映像中使用配置。所以 3GB 的虚拟地址空间分配给内核,1GB 的虚拟地址空间分配给用户空间。现在,如果我在用户空间中运行 stressapptest 并使用 cat 显示 80% 的可用内存/proc/meminfo
,它会抛出一个错误,提示“无法分配内存”。
有没有办法找到为用户空间分配了多少 excat 虚拟地址空间?
root@:/#
root@:/# cat /proc/meminfo | head -5
MemTotal: 1826896 kB
MemFree: 1708308 kB
MemAvailable: 1694060 kB
Buffers: 2484 kB
Cached: 9520 kB
root@:/#
root@:/# ./stressapptest -M 900
2021/09/25-06:48:59(UTC) Log: Commandline - ./stressapptest -M 900
2021/09/25-06:48:59(UTC) Stats: SAT revision 1.0.7_autoconf, 32 bit binary
2021/09/25-06:48:59(UTC) Log: varada @ CHEPSSW01 on Wed Aug 27 12:05:13 IST 2014 from open source release
2021/09/25-06:48:59(UTC) Log: 1 nodes, 4 cpus.
2021/09/25-06:48:59(UTC) Log: Defaulting to 4 copy threads
2021/09/25-06:48:59(UTC) Log: Flooring memory allocation to multiple of 4: 900MB
2021/09/25-06:48:59(UTC) Log: Prefer plain malloc memory allocation.
2021/09/25-06:48:59(UTC) Process Error: memalign returned 0
2021/09/25-06:48:59(UTC) Process Error: failed to allocate memory
2021/09/25-06:48:59(UTC) Process Error: Sat::Initialize() failed
2021/09/25-06:48:59(UTC)
2021/09/25-06:48:59(UTC) Status: FAIL - test encountered procedural errors
2021/09/25-06:48:59(UTC)
2021/09/25-06:48:59(UTC) Process Error: Fatal issue encountered. See above logs for details.
root@OpenWrt:/#