The Linux kernel supports four overcommit handling modes

0	-	Heuristic overcommit handling. Obvious overcommits of
		address space are refused. Used for a typical system. It
		ensures a seriously wild allocation fails while allowing
		overcommit to reduce swap usage.  This is the default.

1	-	No overcommit handling. Appropriate for some scientific
		applications.

2	-	(NEW) swapless strict overcommit. The total address space
		commit for the system is not permitted to exceed 90% of
		free memory. This mode utilizes the new stricter accounting
		but does not impose a very strict rule.  It is possible that
		the system could kill a process accessing pages in certain
		cases.  If mode 3 is too strict when no swap is	present
		this is the best you can do.

3	-	(NEW) strict overcommit. The total address space commit
		for the system is not permitted to exceed swap + half ram.
		In almost all situations this means a process will not be
		killed while accessing pages but only by malloc failures
		that are reported back by the kernel mmap/brk code.

4	-	(NEW) paranoid overcommit. The total address space commit
		for the system is not permitted to exceed swap. The machine
		will never kill a process accessing pages it has mapped
		except due to a bug (ie report it!).

Gotchas
-------

The C language stack growth does an implicit mremap. If you want absolute
guarantees and run close to the edge you MUST mmap your stack for the 
largest size you think you will need. For typical stack usage is does
not matter much but its a corner case if you really really care

In modes 2 and 3 the MAP_NORESERVE flag is ignored. 


How It Works
------------

The overcommit is based on the following rules

For a file backed map
	SHARED or READ only	-	0 cost (the file is the map not swap)

	WRITABLE SHARED		-	size of mapping per instance

For a direct map
	SHARED or READ only	-	size of mapping
	PRIVATE WRITEABLE	-	size of mapping per instance

Additional accounting
	Pages made writable copies by mmap
	shmfs memory drawn from the same pool

Status
------

o	We account mmap memory mappings
o	We account mprotect changes in commit
o	We account mremap changes in size
o	We account brk
o	We account munmap
o	We report the commit status in /proc
o	Account and check on fork
o	Review stack handling/building on exec
o	SHMfs accounting
o	Implement actual limit enforcement

To Do
-----
o	Account ptrace pages (this is hard)
o	Account for shared anonymous mappings properly
	- right now we account them per instance
