I\'m looking for an efficient way to access(for both read and write operations) the memory space of my ptraced child process. The size of blocks being accessed may vary from
If this is Linux (which the tags suggest it is), you can share the entirety of the child's address space with the parent by using clone() with the CLONE_VM
flag. As the two processes share the same VM space, all modifications will be immediately visible between the two, with essentially zero overhead.
This does mean you can't then exec()
in the child; as it will replace the VM space of both processes.