News for hackers. Stuff that matters.
Re:In C, how do you know if the dynamic allocation succeeded? by willbudd on Friday November 05, 2021 @09:30PM (#29126673)
Sounds to me like you (or Python devs?) should be looking at clone(), which is basically a lower level version of fork() that provides precise control over every detail with which the new process is created, including what (if any) parent memory you want to share.

The manual page is quite informative: man clone

Re:In C, how do you know if the dynamic allocation succeeded? by 01100011 on Saturday November 06, 2021 @08:37AM (#29129702)
This. When my team hit the issue we just made a subprocess replacement which relied on clone instead. Before that, we would trigger OOM when trying to run external commands while still having 30% free memory.
Re:In C, how do you know if the dynamic allocation succeeded? by shoo on Friday November 05, 2021 @09:38PM (#29126727)
it looks like cpython is improving and cpython 3.10 now uses vfork when launching subprocesses in linux

years ago when i first hit this in production, we ended up working around it by rewriting our application code to use a pure-python library that did the equivalent thing as the separate command line tool we were trying to launch.