[ECOS] JFFS2 eats memory

Øyvind Harboe oyvind.harboe@zylin.com
Mon Jul 12 14:42:00 GMT 2004


This issue has been discussed before, and although I have a workaround,
I'd dearly like to have it put to bed since it is starting to cause
problems elsewhere in my application:

- My code opens a file for writing with O_TRUNC set, performs
a single write call, closes the file.
- After closing the file, JFFS2 has eaten memory.
- With the attached modifcations to JFFS2, it "only" eats 24 bytes.
- If I unmount and remount JFFS2, no memory is "lost" and JFFS2 works
fine.

Presumably when the raw nodes in the file fragement list are marked as
obsolete, they are no longer required, but are not freed.

Q: Is this fundamentally impossible or a "bad idea" to fix?


-- 
Øyvind Harboe
http://www.zylin.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jffsmemfix.txt
Type: text/x-patch
Size: 1184 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20040712/0e783eae/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