This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
jffs2 leaks memory
- From: Thomas Koeller <thomas dot koeller at baslerweb dot com>
- To: David Woodhouse <dwmw2 at infradead dot org>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 18 May 2004 19:06:11 +0200
- Subject: [ECOS] jffs2 leaks memory
- Organization: Basler AG
Hi David,
there appears to be a memory leak in the jffs2 sources
currently in the ecos repository.
We are using the pooled allocation routines for the
raw_node_ref structs here. This used to work just fine,
but now the pool gets exhausted sooner or later
(later if its size is increased).
Investigating the problem we found an interesting
piece of code, that may well be responsible, but
we do not fully understand it. It is in file gc.c
in line #600:
if (!retried && (nraw == jffs2_alloc_raw_node_ref())) {
That piece of code would appear to allocate a new
instance of struct raw_node_ref, but the allocation
result is not saved, and so the memory can never be
freed again. Is this correct?
tk
--
--------------------------------------------------
Thomas Koeller, Software Development
Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany
Tel +49 (4102) 463-390
Fax +49 (4102) 463-46390
mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com
==============================
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss