not allocate memory, please see the advanced API for this use case.
Finally, you can remove all entries from a maple tree by calling
-mtree_destroy(). If the maple tree entries are pointers, you my wish to free
+mtree_destroy(). If the maple tree entries are pointers, you may wish to free
the entries first.
Allocating Nodes
----------------
-Normal API allocations are handled internal to the tree.
+When using the normal API, the allocations are handled by the internal tree code.
Locking
-------
When using the Normal API, you do not have to worry about locking.
-The Maple Tree uses RCU and interanl spinlock to synchronise access:
+The Maple Tree uses RCU and internal spinlock to synchronise access:
No lock needed:
* mas_destroy()
mas_walk(), then take a reference count on the object you have found before
calling the mas_unlock(). This will prevent stores from removing the object
from the tree between looking up the object and incrementing the refcount. You
-can also use RCU to avoid dereferencing freed memory, but an explaination of
+can also use RCU to avoid dereferencing freed memory, but an explanation of
that is beyond the scope of this document.
If it is necessary to drop the locks during an iteration, then mas_pause()
The advanced API offers more flexibility and better performance at the cost of
an interface which can be harder to use and has fewer safeguards. No locking
is done for you by the advanced API, and you are required to use the mas_lock
-while modifying the tree. You can choose whether to use the mas_lokc or the
+while modifying the tree. You can choose whether to use the mas_lock or the
RCU lock while doing read-only operations on the tree. You can mix advanced
and normal operations on the same array and the normal API is implemented in
terms of the advanced API.
mas_empty_area_rev() can be used. mas_empty_area searches for a gap starting
at the lowest index given up to the maximum of the range. mas_empty_area_rev
searches for a gap starting at the highest index given and continues downward
-to the lower bounds of the range.
+to the lower bound of the range.
Allocating Nodes
In regular B-Tree terms, pivots are called keys. The term pivot is used to
indicate that the tree is specifying ranges, Pivots may appear in the subtree
-with an entry attached to the value where as keys are unique to a specific
+with an entry attached to the value whereas keys are unique to a specific
position of a B-tree. Pivot values are inclusive of the slot with the same
index.
balance, there are empty slots remaining in both left and right nodes after a
split.
-Another way that 'jitter' is avoided is to terminate a spit up early if the
+Another way that 'jitter' is avoided is to terminate a split up early if the
left or right node has space to spare. This is referred to as "pushing left"
or "pushing right" and is similar to the b* tree, except the nodes left or
right can rarely be reused due to RCU, but the ripple upwards is halted which