* [PATCH] repair bootmem memory leak
@ 2001-11-05 13:00 William Lee Irwin III
0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2001-11-05 13:00 UTC (permalink / raw)
To: linux-kernel
While developing my fresh bootmem, the testing I did to ensure there
were no memory leaks discovered a caller leaking memory:
diff -urN linux-virgin/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux-virgin/arch/i386/kernel/setup.c Fri Oct 5 14:45:00 2001
+++ linux/arch/i386/kernel/setup.c Sat Oct 27 12:57:39 2001
@@ -926,7 +926,7 @@
* bootmem allocator with an invalid RAM area.
*/
reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) +
- bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
+ bootmap_size) - (HIGH_MEMORY));
/*
* reserve physical page 0 - it's a special BIOS page on many boxes,
reserve_boootmem_core() already ensures that the endpoint of the
interval to reserve is rounded up to a page boundary, and so this
(demonstrably) leaks a page whenever
PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE -1
is not page-aligned.
Cheers,
Bill
-----------------
willir@us.ibm.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-11-05 13:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 13:00 [PATCH] repair bootmem memory leak William Lee Irwin III
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®