Re: fork: out of memory

Theodore Y. Ts'o (tytso@MIT.EDU)
Sat, 29 Nov 1997 10:14:35 -0500


From: alan@lxorguk.ukuu.org.uk (Alan Cox)
Date: Sat, 29 Nov 1997 11:39:02 +0000 (GMT)

Firstly there is no real way to say

swap_out(physical_address);

and work back to the virtual addresses and remap the pages.

One of the things which BSD kernels have is an array of structures, one
structure per page of physical memory, allocated at boot time.
Obviously, this structure is very small and efficiently utilized, and
even then it takes up a non-trivial amount of memory. However, it does
seems to make a number of tasks much easier, since it allows you to go
back from a physical address to how/where the page is used.

We may want to consider whether having such a structure is useful enough
to be worth the extra memory space that it takes.

- Ted