lkml.org 
[lkml]   [2001]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel memory leak: freeing pagetables in vmfree_area_pages in vmalloc.c
On Thu, 28 Jun 2001 alad@hss.hns.com wrote:
> I was talking about this leak 2 days back but my mail ot lost..
> ----
> we have in vfree -->
> vmfree_area_pages (calling) free_area_pmd (calling) free_area_pte (calling)
> free_page.
> The final free_page frees all the pages that are allocated to a memory
> region in vmalloc.
> Now where are we freeing pages that are allocated to page table themselves.
> For simplicity we can assume 2 level page tables (pgd == pmd)

They're not freed, but I don't see that as a memory leak. The page
tables stay there ready for the next time a vmalloc() needs to expand
into them. Seems sensible to me: do you have an actual case where it
wastes significant memory?

(I haven't thought it through, but I would not be surprised if there
turned out to be awkward races if those page tables were freed when
emptied: the code's probably simpler and surer the way it is.)

Hugh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.035 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site