Allocation and freeing routines for the bitmaps Suspend2 uses.
Signed-off-by: Nigel Cunningham <[email protected]>
kernel/power/suspend.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 769ae96..06ab034 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -469,3 +469,22 @@ int debuginfo_read_proc(char *page, char
return copy_len;
}
+static int allocate_bitmaps(void)
+{
+ if (allocate_dyn_pageflags(&in_use_map) ||
+ allocate_dyn_pageflags(&pageset1_map) ||
+ allocate_dyn_pageflags(&pageset1_copy_map) ||
+ allocate_dyn_pageflags(&pageset2_map))
+ return 1;
+
+ return 0;
+}
+
+static void free_metadata(void)
+{
+ free_dyn_pageflags(&pageset1_map);
+ free_dyn_pageflags(&pageset1_copy_map);
+ free_dyn_pageflags(&pageset2_map);
+ free_dyn_pageflags(&in_use_map);
+}
+
--
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]