2009-03-06 04:43:11     Regarding defragmentation in BF533

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2009-03-06 04:43:11     Regarding defragmentation in BF533

Hari Prasad (INDIA)

Message: 70526   

 

Hi,

 

I need to malloc a memory chunk of 7MB in my app but the max size I can allocate is 2MB coz most of the free memory is fragmented. Is there any mechanism available which will defragment all the fragmented memory so that I can dynamically allocate a 7MB memory chunk?

QuoteReplyEditDelete

 

 

2009-03-06 04:49:25     Re: Regarding defragmentation in BF533

Mike Frysinger (UNITED STATES)

Message: 70528   

 

the mechanism is called "virtual memory".  since the Blackfin lacks a MMU, it cannot defragment things.

 

if you need large chunks, allocate them once at boot and never free them.

QuoteReplyEditDelete

 

 

2009-03-06 04:54:57     Regarding defragmentation in BF533

Michael Hennerich (GERMANY)

Message: 70529    > Is there any mechanism available which will defragment all the fragmented memory

 

No

 

But check this out:

 

docs.blackfin.uclinux.org/doku.php?id=linux-kernel:memory_allocation#silly_nommu_memory_tricks

 

Reserve your 7MB block upfront.

 

-Michael

 

 

QuoteReplyEditDelete

 

 

2009-03-06 07:46:15     Re: Regarding defragmentation in BF533

Hari Prasad (INDIA)

Message: 70531   

 

Hi,

 

Could you please help me how to interpret this error message:

 

DMA free:15384kB min:1008kB low:1260kB high:1512kB active:5804kB inactive:5924kB present:63880kB pages_scanned:12342 all

 

_unreclaimable? no

 

lowmem_reserve[]: 0 0

 

DMA: 64*4kB 53*8kB 37*16kB 9*32kB 6*64kB 13*128kB 20*256kB 13*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 15384kB

 

I got this error when I was trying to create a memory pool of 512KB chunks.

 

 

QuoteReplyEditDelete

 

 

2009-03-06 13:30:30     Re: Regarding defragmentation in BF533

Mike Frysinger (UNITED STATES)

Message: 70537   

 

it's telling you you're out of memory and then it shows you what pieces are free

Attachments

    Outcomes