about summary refs log tree commit diff
path: root/nscd/nscd.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-11-25 21:08:01 +0000
committerUlrich Drepper <drepper@redhat.com>2007-11-25 21:08:01 +0000
commit30294ea4495e48e0103fee4d855737a281cc49fa (patch)
tree23a6e4b71c9fb7758596f212085e0ce8eaf7e4b9 /nscd/nscd.h
parent609bb0712d522828bf52eb539d0b590ae153e55f (diff)
downloadglibc-30294ea4495e48e0103fee4d855737a281cc49fa.tar.gz
glibc-30294ea4495e48e0103fee4d855737a281cc49fa.tar.xz
glibc-30294ea4495e48e0103fee4d855737a281cc49fa.zip
* 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.
Diffstat (limited to 'nscd/nscd.h')
-rw-r--r--nscd/nscd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/nscd/nscd.h b/nscd/nscd.h
index 7ff3894f18..cd6fe15c30 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