added malloc.h to headers