[LibOS] Fix type of checkpoint's total memory size variable

Checkpoint's total memory size is stored in shim_cp_store::mem_size
field. Previously, this field was of type `int`. When a process
allocates more than 2GB of memory and then tries to spawn a child,
the checkpoint send/receive fails due to int overflow of mem_size.
This commit simply changes mem_size type to `size_t`. This is enough
to make the bug go away on e.g. a huge Python app with TensorFlow.
This commit is contained in:
Dmitrii Kuvaiskii
2020-01-17 17:36:07 -08:00
parent 40c08ff75a
commit 57f1bdd47f
+1 -1
View File
@@ -112,7 +112,7 @@ struct shim_cp_store {
/* entries of out-of-band data */
struct shim_mem_entry* last_mem_entry;
int mem_nentries;
int mem_size;
size_t mem_size;
/* entries of pal handles to send */
struct shim_palhdl_entry* last_palhdl_entry;