allocmem of task.c corrected