improve design of alloc shape, prepare for gc impl