diff options
Diffstat (limited to 'include/linux/vmalloc.h')
| -rw-r--r-- | include/linux/vmalloc.h | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6071e911c7f..698b1e50d3a 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -158,4 +158,22 @@ pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms)  # endif  #endif +struct vmalloc_info { +	unsigned long   used; +	unsigned long   largest_chunk; +}; + +#ifdef CONFIG_MMU +#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) +extern void get_vmalloc_info(struct vmalloc_info *vmi); +#else + +#define VMALLOC_TOTAL 0UL +#define get_vmalloc_info(vmi)			\ +do {						\ +	(vmi)->used = 0;			\ +	(vmi)->largest_chunk = 0;		\ +} while (0) +#endif +  #endif /* _LINUX_VMALLOC_H */  |