Hey AB,

> We lost track of this bug. Can you please provide more info.

Here's the e-mail from a few months back:

-----
,----[ Albert Chu <[EMAIL PROTECTED]> ]
| 1) I have grave concerns with the strdup() of all of the event
| messages.  I apologize if I'm missing something, but I can't find
| where these strings are or will be freed.
|                                                                       
| When binary tools mem-leak all over the place and quickly exit, I
| feel its fine.  However, IMHO, libraries should never mem-leak,
| because you don't know how users will use the library.  For example,
| we have a host monitoring tool that loops forever doing sensor
| readings.  The current library would mem-leaks and eventually cause
| our host monitoring daemon to crash.
`----
Memory leaks are serious problems. For libraries and daemons, it is
critical. Even for binaries like "fish" are interpreters. Remember if
perl or bash has memory leaks!!. Let us take this as an important
issue before 0.2 release. 

,----[ Albert Chu <[EMAIL PROTECTED]> ]
| I see several solutions:
|
| 1) Return pointers to statically defined string locations.
|
| 2) Create buffers in the various structures and copy strings into
|       the buffers.
| 3) create a "destroy" or "cleanup" function.
|                                                                       
|                       
| I think option #1 is the best, but that's just me.
`----
There are some more ways.
4) alloca
   It is easier to make alloca portable than avoiding leaks.
   Alloca is also faster than malloc family of functions.
   Freeing is automatic. For string copying, we have strdupa, strndupa
   based on alloca. I personally preferred alloca.

I like the Al's first option (static buffers) too. It is fast and
requires no freeing. Even if we make most of allocations static, total
memory consumed will still be very very small.
-----

Al

--
Albert Chu
[EMAIL PROTECTED]
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory


----- Original Message -----
From: Anand Babu <[EMAIL PROTECTED]>
Date: Tuesday, December 13, 2005 3:08 pm
Subject: Re: [Freeipmi-devel] [bug #14993] libfreeipmi sensor event
messages mem-leaks (ipmi-sensor-event-messages.c)

> ,----[ Albert Chu <[EMAIL PROTECTED]> ]
> |                  Summary: sensor event messages mem-leak => 
> libfreeipmi| sensor event messages mem-leaks (ipmi-sensor-event-
> messages.c)`----
> Hi Al,
> We lost track of this bug. Can you please provide more info.
> -- 
> Anand Babu 
> GPG Key ID: 0x62E15A31
> Blog [http://ab.freeshell.org]              
> The GNU Operating System [http://www.gnu.org]  
> 



_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Reply via email to