Added missing #include <malloc.h>