Accounting for missing ( bootmem? ) memory
I've been trying to track down why free always seems to report a little less total ram than it should, compared to the total usable areas in the e820 memory map. I have been reading mm/bootmem.c and it seems that the low memory zone is managed by this allocator prior to mm_init(), and then free_all_bootmem() is called, which releases all free bootmem pages to mm to handle, and adds that space to totalram_pages. That means that any bootmem that is still allocated is lost from the totalram_pages count.
I'm trying to figure out what is consuming this bootmem. Based on comments in bootmem.c, the memory is initially marked as allocated, and setup_arch() has to explicitly free any that isn't reserved, presumably for things like the kernel itself, and the initrd, and any reserved areas in the e820 map, but I can not find where this is done.
So my questions are:
1) Where is the bootmem initially freed ( so I can see what sections are *not* initially freed )
2) Why is all of the bootmem not reserved in the e820 map not eventually freed and turned over to mm to manage?
3) How can I see what is allocating and never freeing bootmem?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>