|
|
|
|
|
by twoodfin
3004 days ago
|
|
The point is more that processes holding on to a lot of memory often fork and exec and don’t actually need 2X their current allocation in-between. Yes, there are alternative APIs that avoid the need to temporarily hold on to that memory in both processes, but the idiom is still incredibly common. And it’s not unusual for server-style processing to fork without an exec and largely share their parent’s allocation via copy-on-write. That defers allocation until there’s a page fault on a simple memory write, which doesn’t have a particularly helpful mapping to C if you want to return failure to the copying process. |
|