#include "main.h" #include <stdio.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <signal.h> #include <string.h> #include <stdlib.h> #include <io.h> #define NUM 960 int main() { short* buf = NULL; buf = (short*)malloc(NUM*sizeof(short)); if(buf==NULL) { printf("buf is NULL "); } printf("%hd malloc ",buf[0]); memset(buf,0,NUM*sizeof(short)); printf("%hd memset ",buf[0]); free(buf); printf("%hd free ",buf[0]); for(;;); return 0; }