Out of Memory with MFS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Out of Memory with MFS

ソリューションへジャンプ
2,004件の閲覧回数
naftalir
Contributor III

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...

ラベル(1)
0 件の賞賛
返信
1 解決策
1,562件の閲覧回数
naftalir
Contributor III

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.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,562件の閲覧回数
naftalir
Contributor III

Few important notes about my project:

  • Im using Sandisk Micro SD-Card, SDHC 16GB, Class10
  • 64K Allocation Unit
0 件の賞賛
返信
1,562件の閲覧回数
DavidS
NXP Employee
NXP Employee

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

0 件の賞賛
返信
1,563件の閲覧回数
naftalir
Contributor III

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.

0 件の賞賛
返信
1,562件の閲覧回数
DavidS
NXP Employee
NXP Employee

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

0 件の賞賛
返信
1,562件の閲覧回数
naftalir
Contributor III

Thank you for your information :smileyhappy:

0 件の賞賛
返信