This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: Memory leak in JFFS2 unmount
- From: Alf Nilsson <alf dot nilsson at abem dot se>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Mon, 27 Sep 2004 18:02:40 +0200
- Subject: Re: Memory leak in JFFS2 unmount
- References: <1096131175.25269.4.camel@famine>
Øyvind Harboe wrote:
Shouldn't the call to
free(fd)
be
jffs2_free_full_dirent(fd) ?
Sounds like you are onto something.
Could you share your findings that preceded your post?
The memory to be freed is allocated with jffs2_alloc_full_dirent.
The reason that we want the call to be to jffs2_free_full_dirent is that
we are using pooled memory instead of dynamic allocation.
The current system we are developing in is a bit sensitive when it comes
to memory fragmentation, so we have extended the pooled memory concept a
bit, as of now the code needs a lot of tidying up before it can be a
subject for this list.
In our system the free(fd) caused a bit of havoc due to our pools which
all are accessed from the jffs2_alloc_full_dirent &
jffs2_free_full_dirent methods.
Thinking that the jffs2_free_full_dirent is an ecos jffs2 method (which
doesn't do much from the beginning) it should still be called in case of
further development. (And it also helps us with keeping our repository
up do date with the anoncvs version, as a bonus).