|
From: | Martin Schaffner |
Subject: | Re: Mechanism to request physical memory with certain properties, new algorithm |
Date: | Sun, 22 May 2005 15:36:49 +0200 |
struct tree_node { struct tree_node *parent; struct tree_node *left; struct tree_node *right; word_t present_sizes; };Each node represent a region in memory. Root node represents the whole memory (considering that memory is of size 2^M, if that's not the case, you can act as if memory was of size 2^M, and some of the memory was already allocated).When a node has sons, it means that it has ben cut in two: the left son is thelower region, the right son is the upper region.
I suggest calling "left" "lower" and "right" "upper" (or "upper_region", or "upper_half"), so that people do not need to keep this mapping in their heads. This makes it easier especially for people with right-to-left scripts.
Thank you, Martin
[Prev in Thread] | Current Thread | [Next in Thread] |