Messages in this thread | | | Subject | Re: [PATCH]: Compress hibernation image with LZO (in-kernel) | From | Bojan Smojver <> | Date | Wed, 04 Aug 2010 11:58:41 +1000 |
| |
On Wed, 2010-08-04 at 11:50 +1000, Nigel Cunningham wrote: > I don't see what all the fuss was about. save_image is called after > the snapshot is made (hibernate called hibernation_snapshot to create > the image, then swsusp_write which in turn calls save_image), so > there's no possibility of the memory allocated by it being included > in the image or of a memory leak ocuring as a result.
OK, thanks for your input.
I think what was in question was whether the snapshot can change after it was made. I was under the impression that it cannot (hence it is called snapshot - but don't believe me - I have no idea what I'm talking about). Kame seems to think that it can, so all routines that are allocating memory after that point should make sure that pages are marked to be freed upon resume or explicitly freed on resume by remembering pointers into global variables (if I understood correctly).
But, if you say that snapshot is just that (i.e. static after beeing made), that's that then.
PS. I'm polishing the patch a bit in terms of overlapping/in-place compression/decompression (saves memory). Hopefully I'll have a final version to post today.
-- Bojan
| |