Update slice append algorithm

Update slice append algorithm according to growslice1.