Can I do a copy-on-write memcpy in Linux?

后端 未结 6 1334
面向向阳花
面向向阳花 2020-12-01 02:47

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

6条回答
  •  醉酒成梦
    2020-12-01 03:33

    You should be able to open your own memory via /proc/$PID/mem and then mmap() the interesting part of it with MAP_PRIVATE to some other place.

提交回复
热议问题