开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜