From: Kurt Zeilenga Date: Wed, 26 Sep 2001 02:35:41 +0000 (+0000) Subject: Use a 64MB stack (instead of a 64K on some systems) by default. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1055 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5f4d8a71e6967ee090ddfb5c22b4f67808d06b6f;p=openldap Use a 64MB stack (instead of a 64K on some systems) by default. This should be tunable... --- diff --git a/include/ldap.h b/include/ldap.h index 95e8bdcec7..72fca310ae 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -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 )); diff --git a/include/ldap_pvt_thread.h b/include/ldap_pvt_thread.h index a1908c8906..75d4777e3f 100644 --- a/include/ldap_pvt_thread.h +++ b/include/ldap_pvt_thread.h @@ -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, diff --git a/libraries/libldap_r/thr_posix.c b/libraries/libldap_r/thr_posix.c index bfcf7ac8e5..c62cc96f48 100644 --- a/libraries/libldap_r/thr_posix.c +++ b/libraries/libldap_r/thr_posix.c @@ -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 ); diff --git a/servers/slapd/back-bdb/idl.h b/servers/slapd/back-bdb/idl.h index 1d810907fd..c48a47dcd5 100644 --- a/servers/slapd/back-bdb/idl.h +++ b/servers/slapd/back-bdb/idl.h @@ -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 */