Dear Zhiheng,
How are you stopping the simulation before starting the next one? The following forum topic discussed a possible memory leak in the S-Function when stopped improperly: Question about running FAST 8 in Simulink - #4 by Jason.Jonkman.
Best regards,