Re: What to do when out of memory

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Mon Jan 24 2000 - 09:01:54 EST


> It seems it is possible to keep track of memory such that any successful
> mmap will always be pageable - keep track of allocated pages which are
> pending paging and subtract that from free_pages in vm_enough_memory().
> Still, this is getting back to a short thread I started long ago - if I
> have some spare time I'll try implementing it.

I actually implemented it for 1.2.x by simply counting vma sizes in
mm/*.c. You end up needing a lot of swap 'just in case'. If you want to be
completely correct you need to account all R/O shared pages as potentially
private because of ptrace().

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:12 EST