On Sat, Nov 17, 2001 at 01:14:15AM -0800, William Lee Irwin III wrote:> This is a repost including some corrections of a bootmem allocator that> tracks ranges explicitly, and uses segment trees to assist in searching> for available memory. Perhaps it is even a new version. Some prior> reports indicated mail headers were munged, preventing replies and some> people from seeing it at all.

Some more corrections are needed, and many thanks to Russell King forassisting me in finding them, and for providing access to a system inorder to debug these issues.

(1) prevent integer overflow in FEASIBLE()(2) prevent integer overflow in ENDS_ABOVE()(3) test for !segment_contains_point(optimum, goal) in __alloc_bootmem_core() as an additional condition under which the the goal should be discounted as a possible starting address for the returned interval. The symptom seen without the test is an interval that wraps around ULONG_MAX