When a System Generator model is simulated, depending on the blocks in the model, there might be a memory leak which causes an increase in the memory used by the MATLAB process. Each time the simulation is run the memory used might increase due to the memory leak and eventually, MATLAB crashes. Depending on the model the number of simulations which causes the crash differs.
This is due to a known issue with some blocks in System Generator. The root of the problem is an ISIM memory leak which is used by some blocks for simulation.
To release the memory, you must close and open MATLAB again.
This issue is scheduled to be addressed in a future release.