Write a memory allocation library, malloc, free and perhaps mmap, that supports two functions, checkpoint and restore. It would be nice to be able to add simple types as checkpointable as well: integers, floats etc. Checkpoint should be passed a checkpoint name and then save everything that has been allocated to a checkpoint-file. Restore respectively reads a checkpoint file and resumes execution. Large allocations should be written in the background, so that execution can continue during the checkpointing, for the purpose the library should support copy-on-write.