taglinefilesource code
order136include/linux/mm.hextern void free_pages(unsigned long addr, unsigned long order);
order73mm/kmalloc.cint order;
order120mm/kmalloc.c#define NBLOCKS(order)          (sizes[order].nblocks)
order121mm/kmalloc.c#define BLOCKSIZE(order)        (sizes[order].size)
order122mm/kmalloc.c#define AREASIZE(order)    (PAGE_SIZE<<(sizes[order].gfporder))
order127mm/kmalloc.cint order;
order133mm/kmalloc.cfor (order = 0;BLOCKSIZE(order);order++)
order135mm/kmalloc.cif ((NBLOCKS (order)*BLOCKSIZE(order) + sizeof (struct page_descriptor)) >
order136mm/kmalloc.cAREASIZE(order)) 
order139mm/kmalloc.cNBLOCKS (order) * BLOCKSIZE(order) + 
order141mm/kmalloc.c(int) AREASIZE(order),
order142mm/kmalloc.cBLOCKSIZE (order));
order153mm/kmalloc.cint order;
order157mm/kmalloc.cfor (order = 0;BLOCKSIZE(order);order++)
order158mm/kmalloc.cif (size <= BLOCKSIZE (order))
order159mm/kmalloc.creturn order; 
order166mm/kmalloc.cint order,tries,i,sz;
order180mm/kmalloc.corder = get_order (size);
order181mm/kmalloc.cif (order < 0)
order196mm/kmalloc.cif ((page = sizes[order].firstfree) &&
order205mm/kmalloc.csizes[order].firstfree = page->next;
order210mm/kmalloc.csizes [order].nmallocs++;
order211mm/kmalloc.csizes [order].nbytesmalloced += size;
order224mm/kmalloc.csz = BLOCKSIZE(order); /* sz is the size of the blocks we're dealing with */
order227mm/kmalloc.cpage = (struct page_descriptor *) __get_free_pages (priority & GFP_LEVEL_MASK, sizes[order].gfporder);
order239mm/kmalloc.csizes[order].npages++;
order242mm/kmalloc.cfor (i=NBLOCKS(order),p=BH (page+1);i > 1;i--,p=p->bh_next) 
order251mm/kmalloc.cpage->order = order;
order252mm/kmalloc.cpage->nfree = NBLOCKS(order); 
order264mm/kmalloc.cpage->next = sizes[order].firstfree;
order265mm/kmalloc.csizes[order].firstfree = page;
order287mm/kmalloc.cint order;
order292mm/kmalloc.corder = page->order;
order293mm/kmalloc.cif ((order < 0) || 
order294mm/kmalloc.c(order > sizeof (sizes)/sizeof (sizes[0])) ||
order299mm/kmalloc.cp, page->next, page->order);
order325mm/kmalloc.cpage->next = sizes[order].firstfree;
order326mm/kmalloc.csizes[order].firstfree = page;
order331mm/kmalloc.cif (page->nfree == NBLOCKS (page->order))
order336mm/kmalloc.cif (sizes[order].firstfree == page)
order338mm/kmalloc.csizes[order].firstfree = page->next;
order342mm/kmalloc.cfor (pg2=sizes[order].firstfree;
order352mm/kmalloc.cfree_pages ((long)page, sizes[order].gfporder);
order360mm/kmalloc.csizes[order].nfrees++;      /* Noncritical (monitoring) admin stuff */
order361mm/kmalloc.csizes[order].nbytesmalloced -= size;
order517mm/swap.cstatic inline void free_pages_ok(unsigned long addr, unsigned long order)
order519mm/swap.cunsigned long index = addr >> (PAGE_SHIFT + 1 + order);
order520mm/swap.cunsigned long mask = PAGE_MASK << order;
order523mm/swap.cnr_free_pages += 1 << order;
order524mm/swap.cwhile (order < NR_MEM_LISTS-1) {
order525mm/swap.cif (!change_bit(index, free_area_map[order]))
order527mm/swap.cremove_mem_queue(free_area_list+order, (struct mem_list *) (addr ^ (1+~mask)));
order528mm/swap.corder++;
order533mm/swap.cadd_mem_queue(free_area_list+order, (struct mem_list *) addr);
order536mm/swap.cvoid free_pages(unsigned long addr, unsigned long order)
order546mm/swap.cfree_pages_ok(addr, order);
order571mm/swap.c#define RMQUEUE(order) \
order572mm/swap.cdo { struct mem_list * queue = free_area_list+order; \
order573mm/swap.cunsigned long new_order = order; \
order579mm/swap.cnr_free_pages -= 1 << order; \
order581mm/swap.cEXPAND(next, order, new_order); \
order587mm/swap.cstatic inline int mark_used(unsigned long addr, unsigned long order)
order589mm/swap.creturn change_bit(addr >> (PAGE_SHIFT+1+order), free_area_map[order]);
order603mm/swap.cunsigned long __get_free_pages(int priority, unsigned long order)
order619mm/swap.cRMQUEUE(order);
order636mm/swap.cunsigned long order, flags;
order642mm/swap.cfor (order=0 ; order < NR_MEM_LISTS; order++) {
order645mm/swap.cfor (tmp = free_area_list[order].next ; tmp != free_area_list + order ; tmp = tmp->next) {
order648mm/swap.ctotal += nr * (4 << order);
order649mm/swap.cprintk("%lu*%ukB ", nr, 4 << order);