First page Back Continue Last page Overview Graphics
Exposing Address Spaces :
Creation
Address space creation
- New, empty address space :
- open(''/proc/mm'', O_RDWR)
- Copy of current address space
- open(''/proc/self/mm/clone'', O_RDWR)
- open(''/proc/self/clone_mm'', O_RDWR)
- Creates new mm_struct
Notes:
A new address space (and a new mm_struct) could be created by opening /proc/mm. A copy of the current address space could be created by opening either /proc/self/mm/clone or /proc/self/clone_mm, depending on whether you like treating /proc/self/mm both as a file and a directory.
The newly created mm_struct would have a reference count of 1. Opening /proc/self/mm would increment its reference count.