Re: __get_free_pages()

James Mastros (root@jennifer-unix.dyn.ml.org)
Wed, 27 May 1998 18:11:10 -0400 (EDT)


On Wed, 27 May 1998, Andrej Presern wrote:
> Can someone please explain what individual GFP_* bitmasks mean (in
> include/linux/mm.h and as used in __get_free_pages())? Also, what is the
> 'order' argument that __get_free_pages() takes?

__GFP_WAIT: If memory isn't avaible, sleep untill it is
__GFP_IO: We are allowed to do IO (eg swap).
__GFP_{LOW|MED|HI}: Relative necessity.
__GFP_DMA: Only allocate memory that we can DMA into (ie <16 MB on Intel
boxes)

the GFP_* flags are just combinations of the __GFP_* flags defined in
include/linux/mm.h. The order in __get_free_pages is the order of pages we
want (ie 2^order contigious pages. Order of 1 is equivlent to
__get_free_page().)

-=- James Mastros

-- 
True mastery is knowing enough to bullshit the rest.
	-=- Me

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu