Hi,
memory size adjustment:
https://community.freescale.com/message/323494#323494
there is one problem with FFS 4.0.2 that I found in my application, that caused a memory leake. The solution was to modify function media_buffer_allocate_internal() in the FFS source file "media_buffer_manager.cpp" as shown below. The difference is line 30 in the code snippet below (_mem_transfer), which changes the buffer ownership to system, so that free() can be called from any task.
static SECTOR_BUFFER * media_buffer_allocate_internal
(
/* [IN] Buffer length */
_mem_size length,
/* [IN] Flag */
uint32_t flags,
/* [IN] Contigous flag */
boolean physicallyContiguous
)
{ /* Body */
SECTOR_BUFFER * resultBuffer;
switch (flags & (kMediaBufferFlag_NCNB))
{
/* Only NCNB memory required. */
case kMediaBufferFlag_NCNB:
resultBuffer = (SECTOR_BUFFER *)_wl_mem_alloc_uncache(length);
break;
/* No special requirements for the memory type. */
default:
{
resultBuffer = (SECTOR_BUFFER *)_wl_mem_alloc(length);
}
break;
} /* Endswitch */
_mem_transfer(resultBuffer,_task_get_id(), _mqx_get_system_task_id());
return resultBuffer;
} /* Endbody */