pull/25/head
aCaB 14 years ago
parent 4522746ecb
commit 18f620f234
  1. 5
      ChangeLog
  2. 11
      clamd/thrmgr.c
  3. 3
      configure
  4. 3
      configure.in
  5. 4
      libclamav/mpool.c

@ -1,3 +1,8 @@
Tue Jan 17 11:15:57 CET 2012 (acab)
-----------------------------------
* misc: performance improvement for HP-UX PA-RISC - patch from
Michael Pelletier <michael.v.pelletier*raytheon.com> (bb#3926)
Sun Jan 8 19:26:06 CET 2012 (acab)
-----------------------------------
* libclamav: add preliminary support for MS Authenticode signatures,

@ -35,6 +35,7 @@
#include "others.h"
#include "mpool.h"
#include "server.h"
#include "libclamav/others.h"
#ifdef HAVE_MALLINFO
#include <malloc.h>
@ -467,7 +468,15 @@ threadpool_t *thrmgr_new(int max_threads, int idle_timeout, int max_queue, void
#if defined(C_BIGSTACK)
pthread_attr_getstacksize(&(threadpool->pool_attr), &stacksize);
stacksize = stacksize + 64 * 1024;
if (stacksize < 1048576) stacksize = 1048576; /* at least 1MB please */
if (stacksize < 1048576) /* at least 1MB please */
#if defined(C_HPUX) && defined(USE_MPOOL)
/* Set aside one cli_pagesize() for the stack's pthread header,
* giving a 1M region to fit a 1M large-page */
if(cli_getpagesize() < 1048576)
stacksize = 1048576 - cli_getpagesize();
else
#endif
stacksize = 1048576;
logg("Set stacksize to %lu\n", (unsigned long int) stacksize);
pthread_attr_setstacksize(&(threadpool->pool_attr), stacksize);
#endif

3
configure vendored

@ -17684,6 +17684,9 @@ hpux*)
$as_echo "#define C_HPUX 1" >>confdefs.h
if test "$have_mempool" = "yes"; then
LDFLAGS="$LDFLAGS -Wl,+pd,1M"
fi
;;
aix*)
if test "$have_pthreads" = "yes"; then

@ -1035,6 +1035,9 @@ hpux*)
TH_SAFE="-thread-safe"
fi
AC_DEFINE([C_HPUX],1,[os is hpux])
if test "$have_mempool" = "yes"; then
LDFLAGS="$LDFLAGS -Wl,+pd,1M"
fi
;;
aix*)
if test "$have_pthreads" = "yes"; then

@ -64,7 +64,11 @@ static inline void spam(const char *fmt, ...) { fmt = fmt; } /* gcc STFU */
#undef CL_DEBUG /* bb#2222 */
#ifdef C_HPUX
#define MIN_FRAGSIZE 1048576 /* Goes with LDFLAGS=-Wl,+pd,1M */
#else
#define MIN_FRAGSIZE 262144
#endif
#if SIZEOF_VOID_P==8
static const unsigned int fragsz[] = {

Loading…
Cancel
Save