O'Reilly logo

Linux: Embedded Development by Chris Simmonds, Alex González, Alexandru Vaduva

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running out of memory

The standard memory allocation policy is to over-commit, meaning that the kernel will allow more memory to be allocated by applications than there is physical memory. Most of the time, this works fine because it is common for applications to request more memory than they really need. It also helps in the implementation of fork(2): it is safe to make a copy of a large program because the pages of memory are shared with the copy-on-write flag set. In the majority of cases, fork is followed by an exec function call, which unshares the memory and then loads a new program.

However, there is always the possibility that a particular workload will cause a group of processes to try to cash in on the allocations they have been promised ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required