News for hackers. Stuff that matters.
Re:Linux Memory Overcommit (2007) by tsss on Monday August 19, 2024 @03:56PM (#41294119)
When you fork then a complete copy of the parent process is created, including all its memory. This memory is not actually copied until it is changed, but it still doubles the virtual memory usage. So without overcommit, even starting bash through a fork would immediately cause an OOM if your process uses more than 50% of physical memory.
Re:Linux Memory Overcommit (2007) by heavenlyblue on Tuesday August 20, 2024 @08:25AM (#41299411)
That's an incorrect assumption though. Overcommit is for pages that have not been accessed yet, however when forking a valid use case is to share pre-loaded, mostly read-only memory between processes.