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

chunk_alloc fail in call ldap_search_s !!

Hello All,
            I am facing a  problem in calling ldap_search_s , it is
unable to allocate memory
and fails in "chunk_alloc"  that results in segmentation fault of my
program. But this problem
doesn't occur when I call  ldap_search_s for the first time, but I need
to call this API (with same filter) after each hour so next time it is
getting failed.
Seems like some problem with  memory leaks as this problem is prominent
at  time "24:00 or 0:0" .  I debugged this things in gdb and found that
if I delay this call for some 4-5 seconds this doesn't occur but If I
don't wait , chunk_alloc fails at  "0:0"  hour .
        If anyone has faced this problem before . Pls. tell me the
solution of this. Is  calling ldap_search_ext_s  is better as it can
retrieve records one by one
? as I have found out  when there are 2-3 records matching the
crietaria, it doesn't fail but above that ( around  10-12), it gets
failed very frequently.

Any suggession is highly appreciable.