This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

jffs2 leaks memory


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]