* linux/mm/memory.c [ void clear_page_tables(...); ] question...
@ 2001-03-27 14:54 Sardañons, Eliel
0 siblings, 0 replies; only message in thread
From: Sardañons, Eliel @ 2001-03-27 14:54 UTC (permalink / raw)
To: linux-kernel
Function taked from: linux/mm/memory.c
void clear_page_tables(struct mm_struct *mm, unsigned long first, int nr) {
pgd_t * page_dir = mm->pgd;
if (page_dir && page_dir != swapper_pg_dir) {
page_dir += first;
do {
free_one_pgd(page_dir);
page_dir++;
} while (--nr);
/* keep the page table cache within bounds */
check_pgt_cache();
}
}
Hello:
I'm trying to understand the code, and sorry if this is a stupid question.
Here in this function you check if mm->pgd is the swapper_pg_dir if it's you
don't clear it, but then you increment page_dir++ in the loop and you don't
check if
page_dir != swapper_pg_dir ...why? may be when you increment page_dir it
can't become swapper_pg_dir because swapper_pg_dir is always <= page_dir?..
or is something else?
Thanks in advance
Eliel Sardanons
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-27 14:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-27 14:54 linux/mm/memory.c [ void clear_page_tables(...); ] question Sardañons, Eliel
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®