[ECOS] JFFS2 "eating memory" when creating files
Oyvind Harboe
oyvind@harboe.org
Wed Mar 10 13:25:00 GMT 2004
As near as I can tell, JFFS2 "eats memory" because it caches various
information.image.
We are using JFFS2 intermittantly. Inbetween these JFFS2 sessions, we
would like JFFS2 to free up any memory that it allocated.
In this context, RAM is "costly" and CPU to rebuild any cached
information during the next JFFS2 session is "free".
My preferred behaviour would be if JFFS2 freed up all caches once all
files where closed(the least amount of code impact), but if there is no
way to modify JFFS2 to do this, I plan to mount/unmount before/after the
JFFS2 session.
After making the attached changes to fs-ecos.c, things are looking much
better, but JFFS2 still "eats" 24 bytes every time I open, write and
close a file.
Free RAM measurement:
struct mallinfo info;
info = mallinfo();
printf("Available ram %d\n", info.fordblks);
Ãyvind
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jffs2.txt
Type: text/x-patch
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20040310/b2cfb3f3/attachment.bin>
-------------- next part --------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list