malloc and free in rpeanut