Re: buddy system
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 03/17/04
- Next message: pkk: "Re: hardware interrupt mechanism"
- Previous message: tcs: "Re: interrupt acknowledgement"
- In reply to: chrismiceli: "buddy system"
- Next in thread: chrismiceli: "Re: buddy system"
- Reply: chrismiceli: "Re: buddy system"
- Reply: P.T. Breuer: "Re: buddy system"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 17 Mar 2004 08:07:30 +0100
chrismiceli wrote:
>
> I am reading "Understanding the Linux Kernel" (2nd edition) and they
> are describing the buddy system for allocating contiguous blocks of
> memory. I mustn't be grasping the system, could someone explain it to
> me. A good resource would be nice as well describing the buddy system.
> Thanx in advanced.
It is quite simple. Memory allocation is done in
chunks of 2^n pages of alligned memory. Where n
can be anything from 0 to some upper limit.
There is a free list for each n, and each time a
chunk has been released, there is exactly one
possible other chunk of the same size it could be
joined with.
In case there is no free chunks of a specific size,
a larger allocation can be split in two.
-- Kasper Dupont -- der bruger for meget tid paa usenet. For sending spam use mailto:aaarep@daimi.au.dk /* Would you like fries with that? */
- Next message: pkk: "Re: hardware interrupt mechanism"
- Previous message: tcs: "Re: interrupt acknowledgement"
- In reply to: chrismiceli: "buddy system"
- Next in thread: chrismiceli: "Re: buddy system"
- Reply: chrismiceli: "Re: buddy system"
- Reply: P.T. Breuer: "Re: buddy system"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|