From 30294ea4495e48e0103fee4d855737a281cc49fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Nov 2007 21:08:01 +0000 Subject: * nscd/nscd.h (MAX_STACK_USE): Define. * nscd/mem.c (MAX_STACK_USE): Remove definition here. (gc): Initialize stack_used based on allocation in prune_cache. * nscd/cache.c (prune_cache): Use heap for mark array if necessary. Clear array bfore use. * nscd/aicache.c (addhstaiX): Update statistics counter in case memory allocate failed. --- nscd/nscd.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nscd/nscd.h') diff --git a/nscd/nscd.h b/nscd/nscd.h index 7ff3894..cd6fe15 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -58,6 +58,10 @@ typedef enum /* Stack size for worker threads. */ #define NSCD_THREAD_STACKSIZE 1024 * 1024 * (sizeof (void *) / 4) +/* Maximum size of stack frames we allow the thread to use. We use + 80% of the thread stack size. */ +#define MAX_STACK_USE ((8 * NSCD_THREAD_STACKSIZE) / 10) + /* Structure describing dynamic part of one database. */ struct database_dyn -- cgit v1.1