2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

rst: Add comment about old memory unmap

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-11-20 14:41:34 +04:00
parent c3b9448cf7
commit 2ba384e852

View File

@@ -530,7 +530,19 @@ void __export_unmap(void)
/*
* This function unmaps all VMAs, which don't belong to
* the restored process or the restorer
* the restored process or the restorer.
*
* The restorer memory is two regions -- area with restorer, its stack
* and arguments and the one with private vmas of the tasks we restore
* (a.k.a. premmaped area):
*
* 0 TASK_SIZE
* +----+====+----+====+---+
*
* Thus to unmap old memory we have to do 3 unmaps:
* [ 0 -- 1st area start ]
* [ 1st end -- 2nd start ]
* [ 2nd start -- TASK_SIZE ]
*/
static int unmap_old_vmas(void *premmapped_addr, unsigned long premmapped_len,
void *bootstrap_start, unsigned long bootstrap_len)