--- 2.4.19-pre5/mm/page_alloc.c~alloc-fail-whine Sat Mar 30 00:11:57 2002 +++ 2.4.19-pre5-akpm/mm/page_alloc.c Sat Mar 30 00:40:45 2002 @@ -318,7 +318,7 @@ out: /* * This is the 'heart' of the zoned buddy allocator: */ -struct page * __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_t *zonelist) +struct page * ____alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_t *zonelist) { unsigned long min; zone_t **zone, * classzone; @@ -416,6 +416,19 @@ rebalance: goto rebalance; } +struct page * __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_t *zonelist) +{ + struct page *ret = ____alloc_pages(gfp_mask, order, zonelist); + + if (ret == 0) { + printk("%s: %d-order allocation failed. gfp_mask=0x%x\n", + __FUNCTION__, order, gfp_mask); + if (gfp_mask == GFP_HIGHUSER) + printk("uh-oh. It was GFP_HIGHUSER\n"); + } + return ret; +} + /* * Common helper functions. */