I am using CONFIG_VMSPLIT_1G
config in my 32-bit Linux image. so 3GB of virtual address space is allocated to kernel and 1GB of virtual address space to userspace. Now if i run stressapptest in userspace with 80% of the available memory shown using cat /proc/meminfo
, it throws an error saying "failed to allocate memory".
Is there any way to find how much excat amount of virtual address space is allocated for userspace?
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:/#