tags:

views:

23

answers:

1

If I see the output of cat /proc//smaps, I find that there are some memory regions with which no read/write/execute permissions have been associated. Also these region are mapped to inode number 0.

I wanted to know how does a region end up in such a state? Is it some sort of memory leak?

Can these regions be ever used again by the process?

A: 

They're not leaks. They're created by calling mmap() with the MAP_ANONYMOUS and PROT_NONE flags. The process can still use that virtual address space: it could unmap the regions with munmap(), or alter the protections with mprotect().

Such regions are typically used to set up guard pages, which are intended to trigger a signal when a growing data structure grows beyond its current bound.

caf
Thanks. Just one more thing, can you point some source(book/ebook/website) where I can learn such specific things? My primary motto is not to bug you again and again and learn by myself.
crissangel