swapping

Replacing one segment of a program in memory with another and restoring it back to the original when required.