Skip to content
Advertisement

Tag: out-of-memory

Why can a user-process invoke the Linux OOM-killer due to memory fragmentation, even though plenty of RAM is available?

I’ve got a headless ARM-based Linux (v3.10.53-1.1.1) system with no swap space enabled, and I occasionally see processes get killed by the OOM-killer even though there is plenty of RAM available. Running echo 1 > /proc/sys/vm/compact_memory periodically seems to keep the OOM-killer at bay, which makes me think that memory fragmentation is the culprit, but I don’t understand why a

How much memory a program can allocate?

How much memory can I allocate for a C++ program running under Linux? In my test case, using new or malloc can allocate more than 170Gb of memory. As a comparison, The same code can only allocate 1.8G in windows and then terminated. My test machine, one is a virtual machine using virtual box, centos7 64-bit, 2Gb memory. The host

Advertisement