[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

External RAM filesystem



Joel Sherrill wrote:
> I'm late in the discussion but I proposed a couple of years
> ago adding a configuration item for the IMFS.  If you defined
> a structure with three callback functions, you could change
> where memory was allocated in the IMFS.
> 
> + initialize pool  (default NULL)
> + allocate memory (default malloc)
> + free memory  (default free)
> 
> Change the IMFS code to use the provided functions and
> it can easily be switched.
> 

I assume the allocator is a block type allocator. I would be concerned about 
fragmentation issues if not. I know the heap allocator (malloc) can suffer 
from this but I would not expect major long term use of the IMFS with the 
malloc allocator being used. A block type allocator with a set memory size 
would be fine.

I see 2 types of allocation, the node and the memfile block. Should there be 2 
allocators ?

Does the IMFS have any locking making it thread safe ?

This effects the nature of the allocator.

Regards
Chris