[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: memory leak problem.



Hi all,

	Sorry for the late response. I was bit engaged elsewhere...........

The details of the memory leak that was given earlier are as follows:

	A total of 56 bytes ( 40 + 10 + 5 + 1 ) as shown below:


	71.4% = 40 Bytes of garbage allocated in 1 allocation

|       |       0x400379cb in <???>
|       |
|       |       
|       |       0x08058547 in <ldap_init>
|       |                  at open.c:166
|       |
|       |       0x0805847e in <ldap_create>
|       |                  at open.c:94
|       |
|       |       0x0805fee5 in <ldap_int_initialize>
|       |                  at init.c:488
|       |
|       |       0x0805fe8f in <ldap_int_initialize_global_options>
|       |                  at init.c:401
|       |
|       |       0x0805f0dd in <ldap_url_parselist>
|       |                  at url.c:676
|       |
|       |       0x0805eead in <ldap_url_parse>
|       |                  at url.c:543
|       |
|       |       0x0805eacd in <ldap_url_parse_ext>
|       |                  at url.c:265
|       |
|       |       0x08064ec3 in <ber_memcalloc>
|       |                  at memory.c:274       
|
|	|	 0x080b79c1 in <calloc>
|       |                  at src/wrapper.c:421
|       |
|       `-----> 0x080b78c7 in <malloc>
|                          at src/wrapper.c:318   

 17.9% = 10 Bytes of garbage allocated in 1 allocation
|       |
|       |       0x400379cb in <???>
|       |
|       |       
|       |       0x08058547 in <ldap_init>
|       |                  at open.c:166
|       |
|       |       0x0805847e in <ldap_create>
|       |                  at open.c:94
|       |
|       |       0x0805fee5 in <ldap_int_initialize>
|       |                  at init.c:488
|       |
|       |       0x0805fe8f in <ldap_int_initialize_global_options>
|       |                  at init.c:401
|       |
|       |       0x0805f0dd in <ldap_url_parselist>
|       |                  at url.c:676
|       |
|       |       0x0805eead in <ldap_url_parse>
|       |                  at url.c:543
|       |
|       |       0x0805ebf7 in <ldap_url_parse_ext>
|       |                  at url.c:332
|       |
|       |       0x080651fd in <ber_strdup>
|       |                  at memory.c:558
|       |
|       |       0x08064e6f in <ber_memalloc>
|       |                  at memory.c:225
|       |
|       `-----> 0x080b78c7 in <malloc>
|                          at src/wrapper.c:318      

8.9% = 5 Bytes of garbage allocated in 1 allocation
|       |
|       |       0x400379cb in <???>
|       |
|       |       0x08058547 in <ldap_init>
|       |                  at open.c:166
|       |
|       |       0x0805847e in <ldap_create>
|       |                  at open.c:94
|       |
|       |       0x0805fee5 in <ldap_int_initialize>
|       |                  at init.c:488
|       |
|       |       0x0805fe8f in <ldap_int_initialize_global_options>
|       |                  at init.c:401
|       |
|       |       0x0805f0dd in <ldap_url_parselist>
|       |                  at url.c:676
|       |
|       |       0x0805eead in <ldap_url_parse>
|       |                  at url.c:543
|       |
|       |       0x0805eb36 in <ldap_url_parse_ext>
|       |                  at url.c:282
|       |
|       |       0x080651fd in <ber_strdup>
|       |                  at memory.c:558
|       |
|       |       0x08064e6f in <ber_memalloc>
|       |                  at memory.c:225
|       |
|       `-----> 0x080b78c7 in <malloc>
|                          at src/wrapper.c:318   

 1.8% = 1 Bytes of garbage allocated in 1 allocation
|       |
|       |       0x400379cb in <???>
|       |
|       |       
|       |       0x08058547 in <ldap_init>
|       |                  at open.c:166
|       |
|       |       0x0805847e in <ldap_create>
|       |                  at open.c:94
|       |
|       |       0x0805fee5 in <ldap_int_initialize>
|       |                  at init.c:488
|       |
|       |       0x0805fe8f in <ldap_int_initialize_global_options>
|       |                  at init.c:401
|       |
|       |       0x0805f0dd in <ldap_url_parselist>
|       |                  at url.c:676
|       |
|       |       0x0805eead in <ldap_url_parse>
|       |                  at url.c:543
|       |
|       |       0x0805ec9a in <ldap_url_parse_ext>
|       |                  at url.c:389
|       |
|       |       0x080651fd in <ber_strdup>
|       |                  at memory.c:558
|       |
|       |       0x08064e6f in <ber_memalloc>
|       |                  at memory.c:225
|       |
|       `-----> 0x080b78c7 in <malloc>
|                          at src/wrapper.c:318       


If anybody knows, Please do tell me the way to free these...........Thanks in advance.

Thank You

A. Gayathri


On Tue, 23 Apr 2002 09:48:14 -0400
John Morrissey <jwm@horde.net> wrote:

> On Mon, Apr 22, 2002 at 09:54:40AM +0530, A.Gayathri wrote:
> % Good day. My problem is now with the openldap api. Even when I call
> % ldap_init and immediately ldap_unbind, I get the following memory leaks
> % with mtrace. I'm using openldap-2.0.23 and redhat-6.2.
> % 
> % Memory not freed:
> % -----------------
> %    Address     Size     Caller
> % 0x080b8848     0x28  at 	libraries/liblber/memory.c:277
> % 0x080b8878      0x5  at 	libraries/liblber/memory.c:227
> % 0x080b8888      0xa  at 	libraries/liblber/memory.c:227
> % 0x080b8898      0x1  at 	libraries/liblber/memory.c:227  
> 
> AFAIK, ldap_init() followed by ldap_unbind() should free anything allocated.
> 
> Can your memory profiler give a backtrace for these calls? memory.c:227 is
> the generic BER calloc() routine, which could be called most anywhere.
> 
> john
> -- 
> John Morrissey          _o            /\         ----  __o
> jwm@horde.net        _-< \_          /  \       ----  <  \,
> www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__