Hi all,<br>I have been going through the Address Space in the linux and came across two variables in the struct mm_struct and I'm a bit confused about the two:<br>struct mm_struct<br>{<br> ..........<br> atomic_t mm_users; <br>
atomic_t mm_count;<br> ............<br>}<br>Basically, after reading through I came to understand that mm_users are used to store the number of processes or threads using the memory so depending upon the number of users it is going to be set. <br>
But, I am confused with mm_count, it is said the mm_count is increment by one for all the mm_users and when all the mm_users value is reduced to zero then mm_count is reduced. So, my question is can the value of mm_count be ever greater than one because all the mm_users are equivalent to mm_count . So, if not then why are we using the mm_count as we can simply remove the memory areas whenever the mm_users count reduce to zero. <br>
May be the explanation is simple but I'm lost. Thanking all of you in advance.<br><br><br>Regards,<br>Niroj Pokhrel<br>