Hi,
I recently get Out of memory and Stack Overflow messages after writing ~50 Files (5MB each) with WRITE_THROUGH, both for MFS and FAT Writing policy.
prior to this error, which get my system to stuck, there is another message in the Debug Log: "Read request from 0x674E17E3 canceled. Area overlaps with uninitialized FlexBus area.
Thank you all for your help...
Solved! Go to Solution.
Well thank you.
it seems that the problem caused by accessing files on sd too frequently using the fopen() and fclose().
solved after loading the file into memory and then writing back to sd, writing only before removal of the sd.
Few important notes about my project:
Hi Naftalir,
The only adive I can suggest trying is to either increase your task stack size or monitor it to see if it overflows.
If you have TAD (task aware debugging) then halt and look at the heap to see if there is a memory leak and to check stack overflow.
If you do not have TAD, then you can periodically call:
void _tad_lightweight_memory_blocks(void)
and
void _tad_stack_usage(void)
Both in the PSP->PSP Generic->tad->tad.c
Regards,
David
Well thank you.
it seems that the problem caused by accessing files on sd too frequently using the fopen() and fclose().
solved after loading the file into memory and then writing back to sd, writing only before removal of the sd.
Hi Naftalir,
Ok...that spurs my memory that when doing a fclose() there needed to be a _time_delay() (or other blocking) to allow the MFS and other drivers to sync up properly. Your solution of using RAM then writing back OK too.
How often were you opening/closing file?
Regards,
David
Thank you for your information :smileyhappy: