Process uninitialization
When a process ends, what operations does the operating 开发者_Python百科system take, making it unnecessary to include certain uninitialization code? For instance I know it closes open file descriptors, but what about unmapping mapped files, etc?
From the linux man page for mmap(1) at http://www.kernel.org/doc/man-pages/online/pages/man2/mmap.2.html
"The region is also automatically unmapped when the process is terminated."
It is perfectly reasonable to rely on this as it is defined behavior.
精彩评论