4 ms·
IIRC on Linux, it overcommits when allocating, so you can keep mallocing memory beyond capacity and it won't actually fail until you go to use that memory.
by favorited 5y ago
IIRC on Linux, it overcommits when allocating, so you can keep mallocing memory beyond capacity and it won't actually fail until you go to use that memory.
- marcosdumay 5y agoThe GP is describing a signal that your application can react to, not a behavior of allocation failure. Linux could use some improvement on both. The idea that you always have enough swap and can send everything not used there is wrong. Applications know better how they behave a low-memory than the kernel.