This effectively saves the entire state of the system, except that the input buffer for the file stdio appears to have been emptied, and care is taken so that the environment and the command line arguments maintain their new values when the data is reloaded later with loaddata.