Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab - out of memory while calling mex-file in the midde of program

Status
Not open for further replies.

double_amateur

Newbie level 1
Joined
Nov 25, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
I am asking this question because I failed to solve it myself and hope someone can give me any suggestion.

My problem is:

my program includes 3 parts:

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.
I also perform 4 checks:

check 1: part-1 + part-2 as a whole. it means without channel coding, program works well.

check 2: pseudo an input to part-2, it means part-2 stays alone. part-2 works well.

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)
check 3: part-1 + part-2 + part-3 as a whole.

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.
check 4: tried part-2 alone again after clear all variable from check 3 it still results error

Error using encodeBits
Out of memory. Type HELP MEMORY for your options.
check 5: close Matlab window, open Matlab window and run part-2 alone it works well.

So, I cannot understand why it happens, I tried to search hard but I still cannot solve it. On the other hand, I dont understand, why part-2 can work perfectly under low resource as check 2, but part-2 doesn't work under higher resource as check 3. Thank you.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top