Buddy & Traversal (was in Re:Algorithims)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
elderK

Buddy & Traversal (was in Re:Algorithims)

Post by elderK »

Hey people!

I need some help, just... with the conceptual ideas and such of the structures.

Just, Itd really help me alot if I could talk to someone in realtime about it.

This is stupid, Im sure.
But, I cant seem to find much information on Heap Structures, and I cant... see why they would be better.

I figure itd be faster to traverse? Thus better?

Anywho, Im thinking the Block allocation system I will use will be Exponential Buddy Allocation.

Apparently, Compaction is fast and nice under that system.

Which brings me to the next idea... to combine two blocks to form one block, dont both blocks need to be contiguous?

That confused me for awhile, but then I figured out... that buddy allocation works by exponentially splitting blocks until a best fit occurs. So, the Next/Prev blocks ARE right beside each other. They can be compacted / Merged because of that, right?

Atm, Im feeling very stupid and my confidence is slowly going down the drain. Stupid drain.

Hey, I think I just figured it out.
WOOOHHIOOO!
paulbarker

Re:Buddy & Traversal (was in Re:Algorithims)

Post by paulbarker »

There are 2 things called "Heap". The type of Heap talked about in memory management has nothing to do with a Heap data structure.

(1) jus means the memory pool and (2) is pretty much equivalent to a priority queue (actually, I don't know any differences between a heap and a priority queue).

Hope that clears the terminology up.
Schol-R-LEA

Re:Buddy & Traversal (was in Re:Algorithims)

Post by Schol-R-LEA »

For additional information, compare the Wikipedia articles (I know, I know, but these two entries aren't too bad) on the Heap data structure versus heap-based memory allocation schemes.
Post Reply