I have some code where I frequently copy a large block of memory, often after making only very small changes to it.
I have implemented a system which tracks the chan
The copy-on-write mechanism employed e.g. by fork() is a feature of the MMU (Memory Management Unit), which handles the memory paging for the kernel. Accessing the MMU is a priviledged operation, i.e. cannot be done by a userspace application. I am not aware of any copy-on-write API exported to user-space, either.
(Then again, I am not exactly a guru on the Linux API, so others might point out relevant API calls I have missed.)
Edit: And lo, MSalters rises to the occasion. ;-)