开发者

Process uninitialization

开发者 https://www.devze.com 2023-03-12 03:46 出处:网络
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 descriptor

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消