Skip to content
Snippets Groups Projects
Commit 5f4d8a71 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Use a 64MB stack (instead of a 64K on some systems) by default.

This should be tunable...
parent 8c758b34
No related branches found
No related tags found
No related merge requests found
......@@ -1173,17 +1173,50 @@ ldap_get_dn LDAP_P((
LDAP *ld,
LDAPMessage *entry ));
typedef struct ldap_ava {
char *la_attr;
struct berval *la_value;
unsigned la_flags;
#define LDAP_AVA_STRING 0x0000U
#define LDAP_AVA_BINARY 0x0001U
} LDAPAVA;
typedef LDAPAVA** LDAPRDN;
typedef LDAPRDN** LDAPDN;
/* DN formats */
#define LDAP_DN_FORMAT_LDAPV3 0x0000U
#define LDAP_DN_FORMAT_LDAPV2 0x0001U
#define LDAP_DN_FORMAT_DCE 0x0002U
#define LDAP_DN_FORMAT_UFN 0x0003U /* dn2str only */
#define LDAP_DN_FORMAT_MASK 0x000FU
/* str2dn flags */
#define LDAP_DN_PEDANTIC 0x1000U
LDAP_F( int )
ldap_str2dn LDAP_P((
LDAP_CONST char *str,
LDAPDN **dn,
unsigned flags ));
LDAP_F( int )
ldap_dn2str LDAP_P((
LDAPDN *dn,
char **str,
unsigned flags ));
LDAP_F( char * )
ldap_dn2ufn LDAP_P((
ldap_dn2ufn LDAP_P(( /* deprecated */
LDAP_CONST char *dn ));
LDAP_F( char ** )
ldap_explode_dn LDAP_P((
ldap_explode_dn LDAP_P(( /* deprecated */
LDAP_CONST char *dn,
int notypes ));
LDAP_F( char ** )
ldap_explode_rdn LDAP_P((
ldap_explode_rdn LDAP_P(( /* deprecated */
LDAP_CONST char *rdn,
int notypes ));
......
......@@ -41,6 +41,11 @@ ldap_pvt_thread_set_concurrency LDAP_P(( int ));
#define LDAP_PVT_THREAD_CREATE_JOINABLE 0
#define LDAP_PVT_THREAD_CREATE_DETACHED 1
#ifndef LDAP_PVT_THREAD_STACK_SIZE
/* LARGE stack */
#define LDAP_PVT_THREAD_STACK_SIZE (64*1024*1024)
#endif
LDAP_F( int )
ldap_pvt_thread_create LDAP_P((
ldap_pvt_thread_t * thread,
......
......@@ -100,6 +100,11 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
#endif
}
#if defined(LDAP_PVT_THREAD_STACK_SIZE) && LDAP_PVT_THREAD_STACK_SIZE > 0
/* this should be tunable */
pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE );
#endif
#endif
rtn = pthread_create( thread, &attr, start_routine, arg );
......
......@@ -12,7 +12,7 @@
#include "slap.h"
#if 0
#if 1
/* larger IDL sizes (which blow thread stacks) */
#define BDB_IDL_DB_SIZE (1<<16) /* 64K IDL on disk */
#define BDB_IDL_SIZE (1<<17) /* 128K IDL in memory */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment