CLONE_VM Example

This post we will write a code, which will give us an observation what changes when CLONE_VM is added and when it is removed.

Code:




Output:


Notes:

1. Modifications to Local variable 'buf' by child reflected when CLONE_VM is added
2. Modifications to Global variable 'global_value" by child reflected when CLONE_VM is added
3. Modifications to Heap variable 'heap' by child reflected when CLONE_VM is added.

Comments

Popular posts from this blog

Appending and Prepending in Yocto - +=, =+ vs .=, =.

ARM interview questions

Linux driver example for Per CPU Variable