lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 16/20] [Suspend2] Calculate storage needed for an image.
Date
Calculate the storage (in pages) needed for an image, possibly ignoring the
expected compression ratio and/or allowance for extra pagedir1 pages.

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

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

diff --git a/kernel/power/prepare_image.c b/kernel/power/prepare_image.c
index 12d715a..604089f 100644
--- a/kernel/power/prepare_image.c
+++ b/kernel/power/prepare_image.c
@@ -514,3 +514,9 @@ static int attempt_to_freeze(void)
return result;
}

+long storage_needed(int use_ecr, int ignore_extra_pd1_allow)
+{
+ return (main_storage_needed(use_ecr, ignore_extra_pd1_allow)
+ + header_storage_needed());
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-27 01:27    [W:0.265 / U:3.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site