阅读背景:

如何在Linux中找到forked进程与copy-on-write共享的内存量?

来源:互联网 

If there is a process that reads a big file and saves it in its memory(or just a malloced char*), and that main process is forked, if the child process only reads from that memory(or the char*), according to copy-on-write, the memory where the pointer is saved is not copied, and both parent and child share the same memory until either one of them tries to write on that memory in which case the process makes a copy of the memory and changes that. If there is a process that reads a big file and




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: