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

Memory management for client API



Hi,

I'm trying to implement a LDAP client. I see that functions like
ldap_search_ext_s() may dynamically allocate memory.

Is there a way to supply my own memory allocation functions for
open-ldap API? I'm asking because I would like to allocate memory
during initialization, not during run time.

Else, how can I calculate the max amount of memory that such calls
will require? What should happen if not enough memory is available
when a function like ldap_search_ext_s() gets called? Is there a
special error code that indicates that?

Thanks,
Erez