[Suspend2][ 03/20] [Suspend2] Get the real number of free pages (incl. pcp).

Nigel Cunningham
2006-06-26T23:34:13Z

Return the total number of free pages, including pcp pages.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/prepare_image.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/kernel/power/prepare_image.c b/kernel/power/prepare_image.c
index 9f6e96d..cb1a3da 100644
--- a/kernel/power/prepare_image.c
+++ b/kernel/power/prepare_image.c
@@ -73,3 +73,11 @@ static long num_pcp_pages(void)
return result;
}

+/*
+ * Number of free pages, including pcp pages.
+ */
+long real_nr_free_pages(void)
+{
+ return nr_free_pages() + num_pcp_pages();