[Date Prev][Date Next]
Re: reduced DEFAULT_SEARCH_STACK_DEPTH
Suhel Momin wrote:
I want to understand what is the impact of changing following #defines
#define DEFAULT_SEARCH_STACK_DEPTH 16
#define MINIMUM_SEARCH_STACK_DEPTH 8
I can see that this value is used to allocate search_stack.
I modified these values to
#define DEFAULT_SEARCH_STACK_DEPTH 4
#define MINIMUM_SEARCH_STACK_DEPTH 2
This helped in reducing memory footprint however I am not sure about the
wide range impact.
The MINIMUM is a hard limit; the search code expects it to be at least 8.
Anything smaller will cause a SEGV. Never change these definitions. The whole
reason there is a "searchstack" config keyword is so that you can safely
reconfigure this value without changing the code.
The comment on MINIMUM is "The minimum we can function with" - do you think
we're lying when we write comments like that?
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/