* kernel memory leak: freeing pagetables in vmfree_area_pages in vmalloc.c
@ 2001-06-28 10:01 alad
2001-06-28 14:59 ` Hugh Dickins
0 siblings, 1 reply; 2+ messages in thread
From: alad @ 2001-06-28 10:01 UTC (permalink / raw)
To: linux-kernel
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)
Regards
Amol
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel memory leak: freeing pagetables in vmfree_area_pages in vmalloc.c
2001-06-28 10:01 kernel memory leak: freeing pagetables in vmfree_area_pages in vmalloc.c alad
@ 2001-06-28 14:59 ` Hugh Dickins
0 siblings, 0 replies; 2+ messages in thread
From: Hugh Dickins @ 2001-06-28 14:59 UTC (permalink / raw)
To: alad; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-28 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-28 10:01 kernel memory leak: freeing pagetables in vmfree_area_pages in vmalloc.c alad
2001-06-28 14:59 ` Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®