kernels/linux-2.4.0/mm/filemap.c
/*
 * We can potentially split a vm area into separate
 * areas, each area with its own behavior.
 */
We can potentially split a vm area into separate
areas, each area with its own behavior.
We can potentially split a vm area into separate areas each area with its own behavior .
static long madvise_behavior(struct vm_area_struct * vma,
	unsigned long start, unsigned long end, int behavior)
{
	int error = 0;
	if (vma->vm_mm->map_count > MAX_MAP_COUNT)
		return -ENOMEM;
	if (start == vma->vm_start) {
		if (end == vma->vm_end) {
			setup_read_behavior(vma, behavior);
			vma->vm_raend = 0;
		} else
			error = madvise_fixup_start(vma, end, behavior);
	} else {
		if (end == vma->vm_end)
			error = madvise_fixup_end(vma, start, behavior);
		else
			error = madvise_fixup_middle(vma, start, end, behavior);
	}
	return error;
}
static long madvise_behavior ( struct vm_area_struct * vma , unsigned long start , unsigned long end , int behavior ) { int error = 0 ; if ( vma -> vm_mm -> map_count > MAX_MAP_COUNT ) return - ENOMEM ; if ( start == vma -> vm_start ) { if ( end == vma -> vm_end ) { setup_read_behavior ( vma , behavior ) ; vma -> vm_raend = 0 ; } else error = madvise_fixup_start ( vma , end , behavior ) ; } else { if ( end == vma -> vm_end ) error = madvise_fixup_end ( vma , start , behavior ) ; else error = madvise_fixup_middle ( vma , start , end , behavior ) ; } return error ; }
We can potentially split a vm area into separate
 areas, each area with its own behavior.
We can potentially split a vm area into separate areas each area with its own behavior .
/* This caps the number of vma's this process can own */