In a large complex C program, I wish to save - to a file - the contents of all memory that is used by static variables, global structures and dynamically allocated variables. Then, in a separate execution of the program, I want to initialize the memory from this saved state. If this is even possible, can someone offer an approach to accomplish this? This has to do with jump-starting a trajectory simulation from a previously saved state.