linux-lts-quantal-3.5.0/kernel/replay.c
// Actually preallocates a region of memory
Actually preallocates a region of memory
Actually preallocates a region of memory
static long
do_preallocate (u_long start, u_long end)
{
	u_long retval;
	MPRINT ("preallocating mmap_pgoff with address %lx and len %lx\n", start, end-start);
	retval = sys_mmap_pgoff (start, end-start, 1, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0);
	if (start != retval) {
		printk ("preallocating mmap_pgoff returns different value %lx than %lx\n", retval, start);
		return -1;
	}
	return 0;
}
static long do_preallocate ( u_long start , u_long end ) { u_long retval ; MPRINT ( " \n " , start , end - start ) ; retval = sys_mmap_pgoff ( start , end - start , 1 , MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS , -1 , 0 ) ; if ( start != retval ) { printk ( " \n " , retval , start ) ; return -1 ; } return 0 ; }
Actually preallocates a region of memory
Actually preallocates a region of memory