Currently I am using the undocumented memory profiling feature in MATLAB (profile -memory on) to benchmark a number of optimization solvers. For test cases of increasing complexity, some solvers have monotonically increasing peak memory usage (i.e. 9788 kb,39140,88064,88064,244620,352252,474684 ...) whereas others have up-and-down usage (i.e. 128 kb,0,264,1472,656,540,1124, ...). What is happening here? Does MATLAB samples the amount of memory used every fixed interval?