At 17 Aug 2004 03:05:43 -0700, Thomas Bushnell BSG wrote: > > "Neal H. Walfield" <[EMAIL PROTECTED]> writes: > > > It is not a memory leak as it can still be reclaim. It will be > > reclaimed (because it has no references) when the mapping cache is > > full. Or, and perhaps this is a better approach, we add a check in > > the release function to see if the kernel has a copy and if not, drop > > it at that point. > > > > > (I think the solution is to have a proper interlock when you drop the > > > last reference, but this is very tricky to get right.) > > > > I am not sure what you envision here. > > What I envision is a check when you release the last reference to drop > it if the kernel doesn't have a copy. I meant to say that such things > can be tricky, whether it is depends on the details and what locking > structure you have. > > What happens if the mapping cache never fills because the kernel > always pages things out in time? The problem here is that you still > have the data around taking up a real memory page; the kernel > requested a pageout and you haven't freed the page.
Nope, the page is freed. The only memory that is consumed is the associations in the two hashes. However, I have now become convinced that the better strategy is to drop the association in the release function if the kernel does not have a copy. Neal _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-hurd