This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Running out of Heap Memory

Hi,

I am running a matrix multiplication program, in which I:

-use as input two text files containing square matrices

-malloc space for the input matrices as well as the resulting matrix

-multiply using Open MP

-use TSCL to record the runtime of the matrix calculation

-do the multiplication multiple times and get multiple values for the runtime

-print the results of the multiplication to the console.

I have it loop through matrices of different sizes. Each time, I run free on all instances of malloc before looping. Yet after a few loops, the heap memory still gets filled and I get the following error:

[C66xx_0] ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x800418, size=896
ti.sdo.ipc.heaps.HeapMemMP: line 740: E_memory: Out of memory: handle=0x800418, size=896

My CCS General settings are as folows:

Compiler: TI v7.4.0B2

EDMA3 Low Level Driver 2.11.5

IPC 1.24.2.27

MCSDK 2.1.02

NDK 2.21.0.32

OpenMP Bios1.1.2.03_beta

SYS/BIOS 6.33.4.39

XDCtools version 3.23.3.53

Configuration: Release

Platform: ti.omp.examples.platforms.evm6678

I have tried scanning through the matrix files in both directions, reducing the number of times I repeat the multiplication per matrix size. It seems related to the size of the data, since the number of matrices the program can multiply before giving me that error decreases as the average size of my matrices increases.

Thanks

  • Hi Elaina,

    It sounds like there is a memory leak somewhere. Can you try looking at HeapMemMP in ROV (under Tools in CCS)? You can run to a good point and halt the processor. Look at HeapMemMP in ROV. Then run one iteration, halt and check out ROV again. This will help you determine if there is a leak or not.

    Todd