Page 1 of 1

FatFS/Chibios Heap Memory Fragmentation

Posted: Sun Mar 09, 2014 4:53 pm
by Tabulous
just discovered this, ive got one fragment of 512 bytes?

ch> mem
core free memory : 102296 bytes
heap fragments : 1
heap free total : 512 bytes

This is caused by calls to f_chdir as this allocates memory from the heap.

In ffconf.h ive got

#define _USE_LFN 3 /* 0 to 3 */
#define _FS_RPATH 1 /* 0 to 2 */


Why would this fragmentation be happening ? and is this something i should worry about ?

Re: FatFS/Chibios Heap Memory Fragmentation

Posted: Sun Mar 09, 2014 8:27 pm
by Giovanni
It is normal.

Giovanni

Re: FatFS/Chibios Heap Memory Fragmentation

Posted: Mon Mar 10, 2014 8:40 am
by Tabulous
Giovanni wrote:It is normal.

Giovanni


Hi Giovanni,
you says it normal, but is this memory now lost ?

Re: FatFS/Chibios Heap Memory Fragmentation

Posted: Mon Mar 10, 2014 10:31 am
by Giovanni
It is not lost, one chunk went from the unused ram to the chain of the free blocks.

Giovanni