[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: How does "fork()" work?
- From: Thornton Prime <thornton yoyoweb com>
- To: <redhat-list redhat com>
- Subject: Re: How does "fork()" work?
- Date: Wed, 28 Feb 2001 12:51:32 -0800 (PST)
On Wed, 28 Feb 2001, Living Dead wrote:
> To put it in another way:
> If I allocate 32Mb of memory in the parent process,
> then I call fork(), the amount of memory needed for
> both parent and child is 64Mb?
The way Linux works, no, each child doesn't make a full copy in memory.
Linux uses a copy-on-write method, so once the parent or the child
"dirty" a page in memory, the page (and only that page) is duplicated.
thornton
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]