2011-02-07 23:29:49

by Sri Ram Vemulpali

[permalink] [raw]
Subject: Regarding Buddy Allocator

Can anyone point me to implementation of buddy allocator, with
efficient data structures used. Thanks in advance.

I am trying to get another thought or implementation on code.


--
Regards,
Sri.


2011-02-08 02:53:01

by Mulyadi Santosa

[permalink] [raw]
Subject: Re: Regarding Buddy Allocator

On Tue, Feb 8, 2011 at 06:29, Sri Ram Vemulpali <[email protected]> wrote:
> Can anyone point me to implementation of buddy allocator, with
> efficient data structures used. Thanks in advance.

I think, indirectly, you can read about buddy allocator in here:
http://lxr.linux.no/#linux+v2.6.37/Documentation/vm/


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

2011-02-08 05:59:13

by Cong Wang

[permalink] [raw]
Subject: Re: Regarding Buddy Allocator

On Mon, 07 Feb 2011 18:29:48 -0500, Sri Ram Vemulpali wrote:

> Can anyone point me to implementation of buddy allocator, with efficient
> data structures used. Thanks in advance.
>
> I am trying to get another thought or implementation on code.

You need to check mm/page_alloc.c, especially __rmqueue_fallback()
and __free_one_page().

2011-02-08 17:33:54

by Sri Ram Vemulpali

[permalink] [raw]
Subject: Re: Regarding Buddy Allocator

Thanks Santosa, Not much is mentioned in the link you mentioned.

I looking for more of explanation and optimal implementation. Any
reference would be good too.

--Sri

On Mon, Feb 7, 2011 at 9:52 PM, Mulyadi Santosa
<[email protected]> wrote:
> On Tue, Feb 8, 2011 at 06:29, Sri Ram Vemulpali <[email protected]> wrote:
>> Can anyone point me to implementation of buddy allocator, with
>> efficient data structures used. Thanks in advance.
>
> I think, indirectly, you can read about buddy allocator in here:
> http://lxr.linux.no/#linux+v2.6.37/Documentation/vm/
>
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>



--
Regards,
Sri.

2011-02-08 18:01:54

by Dave Hylands

[permalink] [raw]
Subject: Re: Regarding Buddy Allocator

Hi Sri,

On Tue, Feb 8, 2011 at 9:33 AM, Sri Ram Vemulpali
<[email protected]> wrote:
> Thanks Santosa, Not much is mentioned in the link you mentioned.
>
> I looking for more of explanation and optimal implementation. Any
> reference would be good too.

Googling for buddy allocator seems to come up with several good links,
including at least one with an implementation
<http://lmgtfy.com/?q=buddy+allocator>

Dave Hylands