modified pol.c. how can I allocate memory ?