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.
Tool/software: TI C/C++ Compiler
Hi,
My application needs to open more than 32 files, I am able to open with updated RTS Library. I referred to the below link to re-compile the RTS library and updated the macro
_NSTREAM, _NFILE
Link to E2E Query: "e2e.ti.com/.../1875290".
Currently, I am able to open more than 32 files, when I tried to read data from the file, fopen is returning 0 bytes read.
When I tried to debug the issue, I found memory request through malloc is not happening as expected. I have attached the code where malloc is failing.
It looks like malloc is unable to allocate requested memory. I tried increasing heap memory in TestApplication but with no help. Can you please let me know how to resolve malloc issue in RTS Library.
Regards
Harish
Harish Midathala said:I am able to open with updated RTS Library.
I presume you modified the macro _NFILE as described in the section titled Allowable Number of Open Files of the C6000 compiler manual.
If malloc failed, you must have used up all the memory in the heap. The only solution is to increase the size of the heap. Control that with the linker option --heap_size=number.
Thanks and regards,
-George