pub fn stack_layout( total: f32, sizes: &[StackItem], intervals: &mut [(f32, f32)]) -> f32
1-D stack layout to make the algorithm clear.