Messages in this thread Patch in this message | | | Date | Mon, 30 Aug 1999 17:07:03 +0200 (MET DST) | From | Christian Ehrhardt <> | Subject | free_area_init wastes mem |
| |
Hi,
Disclaimer: I'm relativly new to kernel hacking and I might have overlooked something. The patch was only tested on a single box.
The free_area bitmaps allocated by free_area_init are about twice as large as actually needed. Patch:
--- linux-2.3.15/mm/page_alloc.c.orig Mon Aug 30 16:30:06 1999 +++ linux-2.3.15/mm/page_alloc.c Mon Aug 30 16:30:34 1999 @@ -335,7 +335,7 @@ init_mem_queue(free_area+i); mask += mask; end_mem = (end_mem + ~mask) & mask; - bitmap_size = (end_mem - PAGE_OFFSET) >> (PAGE_SHIFT + i); + bitmap_size = (end_mem - PAGE_OFFSET) >> (PAGE_SHIFT + i + 1); bitmap_size = (bitmap_size + 7) >> 3; bitmap_size = LONG_ALIGN(bitmap_size); free_area[i].map = (unsigned int *) start_mem; -Christian
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |