DragonFly commits List (threaded) for 2004-05
cvs commit: src/sys/i386/i386 pmap.c
dillon 2004/05/26 16:34:25 PDT
DragonFly src repository
Mask bits properly for pte_prot() in case it is called with additional
Fix a wired memory leak bug in pmap_enter(). If a page wiring change is
made and the page has already been faulted in for read access, and a
write-fault occurs, pmap_enter() was losing track of the wiring count in
the pmap when it tried to optimize the RO->RW case in the page table.
This prevented the page table page from being freed and led to a memory leak.
The case is easily reproducable if you attempt to wire the data/bss crossover
page in a program (typically just declare a global variable in a small program
and mlock() its page, then exit without munlock()ing). 4K is lost each time
the program is run.
Revision Changes Path
1.41 +6 -9 src/sys/i386/i386/pmap.c