[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: serious memory leak

From: Pawel Kot
Subject: Re: serious memory leak
Date: Sun, 27 Jun 2010 13:17:52 +0400


On Sun, Jun 27, 2010 at 07:01, cm7005 <address@hidden> wrote:
> I tried a few days to find out something about memory leak in gnokii-0.6.29.
> It seems the memory leak is a big problem. When I try to use gnokii --getsms
> IN 1 1 to read only one message, the VLD shows me 51 memory leaks. I

That's because you have 51 messages in the phone.

> searched the source code in gnokii source code directory, and I find
> something strange about function:
> "gn_error NK6510_GetFileListCache(gn_data *data, struct gn_statemachine
> *state)"
> In this function, "map_add" and "map_get" functions are called in many file
> system operations, but the "map_free" and "map_del" functions have never
> been called at all. Will this cause memory leak?

Depends on what you're calling a leak. As you could notice the
function is called *Cache. That means that it caches some data for the
later use. The thing is that in certain models of series40 the SMS are
stores as separate files. To get the message (--getsms) we need to get
file listing. In case of large listings it takes time long time. That
would mean that for --getsms ME 1 end we would need to read the file
listing for every message which would take agest. That's why we cache
the file listing. The file listing has timeout and it will be reread
once this timeout is exceeded (which is most likely not the case for
--getsms but rather for smsd).
The structure is not freed on the program exit but that's something
that operating system deals with. So I wouldn't call it a memleak.

> BTW: the "--getfilelist c:/predefmessages/1/*" works just fine. Only one
> memleak has been detected. I think the problem is maybe in functions of
> reading file content. I also tried to use "NK6510_GetFileList" instead of
> the cache version, but no lucky, the memleaks are still there. If I use
> "--getsms IN 1 end" to read SMS in a loop, it will cause Windows 7 dump
> memory blue screen, then I have to reboot. So this is not a small bug, can
> anyone help me please?

And what is the actual problem?

Pawel Kot

reply via email to

[Prev in Thread] Current Thread [Next in Thread]