r1643 change memory allocation structure