SMP *foo = (SMP*)malloc(sizeof(SMP));

・・・

free(foo);