I am developing an add on to MATLAB/Simulink and until now, I have been using the mx* functions to do memory management within the C MEX S-Functions.
Recently, I discovered the following article:
<http://www.mathworks.com/support/solutions/en/data/1-5RMJID/?solution=1-5RMJID>
This suggests that mxMalloc and mxFree() should not be used in C MEX functions and malloc() and free() should be used instead. I haven't noticed any bad behavior from the mx* functions as of yet, so I was wondering if this is a really serious issue.
Best Answer