Changes to allocate_from_hole() to make it more easily understandable.  New function split_segment_in_two() to that end.