kernels/linux-2.4.0/drivers/char/agp/agpgart_be.c
/* 
 * Basic Page Allocation Routines -
 * These routines handle page allocation
 * and by default they reserve the allocated 
 * memory.  They also handle incrementing the
 * current_memory_agp value, Which is checked
 * against a maximum value.
 */
Basic Page Allocation Routines
These routines handle page allocation
and by default they reserve the allocated
memory.  They also handle incrementing the
current_memory_agp value, Which is checked
against a maximum value.
Basic Page Allocation Routines These routines handle page allocation and by default they reserve the allocated memory . They also handle incrementing the current_memory_agp value Which is checked against a maximum value .
static unsigned long agp_alloc_page(void)
{
	void *pt;
	pt = (void *) __get_free_page(GFP_KERNEL);
	if (pt == NULL) {
		return 0;
	}
	atomic_inc(&virt_to_page(pt)->count);
	set_bit(PG_locked, &virt_to_page(pt)->flags);
	atomic_inc(&agp_bridge.current_memory_agp);
	return (unsigned long) pt;
}
static unsigned long agp_alloc_page ( void ) { void * pt ; pt = ( void * ) __get_free_page ( GFP_KERNEL ) ; if ( pt == NULL ) { return 0 ; } atomic_inc ( & virt_to_page ( pt ) -> count ) ; set_bit ( PG_locked , & virt_to_page ( pt ) -> flags ) ; atomic_inc ( & agp_bridge . current_memory_agp ) ; return ( unsigned long ) pt ; }
Basic Page Allocation Routines
 These routines handle page allocation
 and by default they reserve the allocated
 memory.
Basic Page Allocation Routines These routines handle page allocation and by default they reserve the allocated memory .