Messages in this thread | | | Date | Wed, 09 Feb 2000 22:06:09 +0100 | From | Manfred Spraul <> | Subject | Re: how does kernel get the "current" task struct? |
| |
Jamie Lokier wrote: > That's what I said. E.g., you have a zone starting at 4k that's 32k > long. You initialise the allocator by calling free_page on each page. > The buddy structure ends up looking like this: > > 4k @ 4k > 16k @ 8k > 4k @ 24k > No. It could end up like this, but it doesn't end up like this right now :-(
__free_pages_ok() aligns the buddy algorithm to "page - mem_map + zone->offset".
This means that 44k starting at 4k will end up as
32k @ 4k x = 0 8k @ 36k x = 8 4k @ 44k x = 10
where x = (page-mem_map+zone->offset)/sizeof(struct page).
I doubt that this is a problem, because zones are aligned on MB boundaries, but perhaps this could become a problem for a weird DISCONTIGMEM embedded system.
-- Manfred
- 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/
| |