我问这个问题是因为我自己没有解决它,希望有人能给我任何建议。
我的问题是:
我的程序包括 3 个部分:
part-1: video encoder,
part-2: channel coding - also call to a mex-files: complie from C-function "encodeBits.c" to Matlab-mexfile "encodeBits.mexw32",
part-3: video decoder.
我还执行 4 项检查:
检查1:part-1 + part-2作为一个整体。这意味着没有通道编码,程序运行良好。
检查 2:对 part-2 的伪输入,这意味着part-2 保持独立。第 2 部分效果很好。
part-2 still works well even under this condition:
possible array: **632** MB (6.623e+08 bytes) *
Memory available for all arrays: **1054** MB (1.105e+09 bytes) **
Memory used by MATLAB: 653 MB (6.842e+08 bytes)
Physical Memory (RAM): 2795 MB (2.930e+09 bytes)
检查3:part-1 + part-2 + part-3作为一个整体。
memory before part 1 runs:
Maximum possible array: 877 MB (9.199e+08 bytes) *
Memory available for all arrays: 1265 MB (1.326e+09 bytes) **
Memory used by MATLAB: 441 MB (4.628e+08 bytes)
Physical Memory (RAM): 2795 MB (2.930e+09 bytes)
memory before part-2 runs, means after part-1 finished:
Maximum possible array: **869** MB (9.107e+08 bytes) *
Memory available for all arrays: **1270** MB (1.332e+09 bytes) **
Memory used by MATLAB: 430 MB (4.511e+08 bytes)
Physical Memory (RAM): 2795 MB (2.930e+09 bytes)
and it results error right after part-2 starting with error
Error using encodeBits
Out of memory. Type HELP MEMORY for your options.
检查 4:在清除检查 3 中的所有变量后再次单独尝试第 2 部分它仍然导致错误
Error using encodeBits
Out of memory. Type HELP MEMORY for your options.
检查5:关闭Matlab窗口,打开Matlab窗口并单独运行第2部分 效果很好。
所以,我不明白它为什么会发生,我试图努力搜索,但我仍然无法解决它。