time | Calls | line |
---|
| | 11 | function [requestedCount, MAX_PRINT_COUNT] = requestGCIfNeeded()
|
< 0.001 | 12 | 12 | MAX_PRINT_COUNT = 25;
|
< 0.001 | 12 | 13 | persistent printCountSinceLastGC;
|
< 0.001 | 12 | 14 | if isempty(printCountSinceLastGC)
|
| | 15 | printCountSinceLastGC = 0;
|
< 0.001 | 12 | 16 | end
|
< 0.001 | 12 | 17 | printCountSinceLastGC = printCountSinceLastGC + 1;
|
< 0.001 | 12 | 18 | if ~mod(printCountSinceLastGC, MAX_PRINT_COUNT)
|
| | 19 | java.lang.System.gc();
|
| | 20 | printCountSinceLastGC = 0;
|
< 0.001 | 12 | 21 | end
|
< 0.001 | 12 | 22 | requestedCount = printCountSinceLastGC;
|
< 0.001 | 12 | 23 | end
|
Other subfunctions in this file are not included in this listing.