-rw-r--r-- | libical/src/libical/icalmemory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libical/src/libical/icalmemory.c b/libical/src/libical/icalmemory.c index 3ed38ad..d22561e 100644 --- a/libical/src/libical/icalmemory.c +++ b/libical/src/libical/icalmemory.c @@ -48,49 +48,49 @@ * string representations of components. */ #define ICALMEMORY_C #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef DMALLOC #include "dmalloc.h" #endif #include "icalmemory.h" #include "icalerror.h" #include <stdio.h> /* for printf (debugging) */ #include <stdlib.h> /* for malloc, realloc */ #include <string.h> /* for memset(), strdup */ #ifdef WIN32 #include <windows.h> #endif -#define BUFFER_RING_SIZE 100 +#define BUFFER_RING_SIZE 25 #define MIN_BUFFER_SIZE 64 /* HACK. Not threadsafe */ typedef struct { int pos; void *ring[BUFFER_RING_SIZE]; } buffer_ring; void icalmemory_free_tmp_buffer (void* buf); void icalmemory_free_ring_byval(buffer_ring *br); static buffer_ring* global_buffer_ring = 0; #ifdef HAVE_PTHREAD #include <pthread.h> static pthread_key_t ring_key; static pthread_once_t ring_key_once = PTHREAD_ONCE_INIT; static void ring_destroy(void * buf) { if (buf) icalmemory_free_ring_byval((buffer_ring *) buf); pthread_setspecific(ring_key, NULL); |