/* where the second term is the sum of (1) reclaimable slab pages, (2) active and (3) inactive anonymouns pages, (4) active and (5) inactive file pages, minus mapped file pages.  */
static unsigned long minimum_image_size(unsigned long saveable)
/* where the second term is the sum of (1) reclaimable slab pages, (2) active and (3) inactive anonymouns pages, (4) active and (5) inactive file pages, minus mapped file pages.  */
static unsigned long minimum_image_size(unsigned long saveable)
{
	unsigned long size;
	size = global_page_state(NR_SLAB_RECLAIMABLE)
		+ global_page_state(NR_ACTIVE_ANON)
		+ global_page_state(NR_INACTIVE_ANON)
		+ global_page_state(NR_ACTIVE_FILE)
		+ global_page_state(NR_INACTIVE_FILE)
		- global_page_state(NR_FILE_MAPPED);
	return saveable <= size ? 0 : saveable - size;
}