--- zzzz-none-000/linux-2.4.17/include/linux/vmalloc.h 2001-11-22 19:46:20.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/include/linux/vmalloc.h 2004-11-24 13:21:45.000000000 +0000 @@ -20,12 +20,23 @@ extern struct vm_struct * get_vm_area (unsigned long size, unsigned long flags); extern void vfree(void * addr); -extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot); extern long vread(char *buf, char *addr, unsigned long count); extern void vmfree_area_pages(unsigned long address, unsigned long size); extern int vmalloc_area_pages(unsigned long address, unsigned long size, int gfp_mask, pgprot_t prot); +#if defined (CONFIG_AVM_MEM_MONITORING) + +extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot, const char * file); + +#define vmalloc(s) __vmalloc((s),GFP_KERNEL|__GFP_HIGHMEM,PAGE_KERNEL,__FILE__) +#define vmalloc_dma(s) __vmalloc((s),GFP_KERNEL|GFP_DMA,PAGE_KERNEL,__FILE__) +#define vmalloc_32(s) __vmalloc((s),GFP_KERNEL,PAGE_KERNEL,__FILE__); + +#else + +extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot); + /* * Allocate any pages */ @@ -53,6 +64,8 @@ return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL); } +#endif + /* * vmlist_lock is a read-write spinlock that protects vmlist * Used in mm/vmalloc.c (get_vm_area() and vfree()) and fs/proc/kcore.c.