![]() | |||||||||||||
Messages in this thread Patch in this message |
Routines to tell the core how much memory and space in the image header is
required for the compression support.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/compression.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/kernel/power/compression.c b/kernel/power/compression.c
index 6578e8c..b8005c7 100644
--- a/kernel/power/compression.c
+++ b/kernel/power/compression.c
@@ -399,4 +399,21 @@ static int suspend_compress_print_debug_
return len;
}
+/*
+ * suspend_compress_compression_memory_needed
+ *
+ * Tell the caller how much memory we need to operate during suspend/resume.
+ * Returns: Unsigned long. Maximum number of bytes of memory required for
+ * operation.
+ */
+static unsigned long suspend_compress_memory_needed(void)
+{
+ return 2 * PAGE_SIZE;
+}
+
+static unsigned long suspend_compress_storage_needed(void)
+{
+ return 4 * sizeof(unsigned long) + strlen(suspend_compressor_name) + 1;
+}
+
--
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 04:41 [from the cache] ©2003-2008 | |||||||||||||