From 70be1349d5134f86ebb9658acef7fc7966784a6e Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 29 Jul 2010 07:04:44 -0600 Subject: [PATCH] Make memory_pools_limit an int64_t to handle signed "none" values. --- src/cf.data.pre | 4 ++-- src/mem.cc | 2 +- src/structs.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cf.data.pre b/src/cf.data.pre index 6ac87df1fd..fbf95e2815 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -6695,7 +6695,7 @@ DOC_END NAME: memory_pools_limit COMMENT: (bytes) -TYPE: b_size_t +TYPE: b_int64_t DEFAULT: 5 MB LOC: Config.MemPools.limit DOC_START @@ -6714,7 +6714,7 @@ DOC_START will be no limit on the total amount of memory used for safe-keeping. To disable memory allocation optimization, do not set - memory_pools_limit to 0. Set memory_pools to "off" instead. + memory_pools_limit to 0 or none. Set memory_pools to "off" instead. An overhead for maintaining memory pools is not taken into account when the limit is checked. This overhead is close to four bytes per diff --git a/src/mem.cc b/src/mem.cc index 48ec16e837..a94cf5545c 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -346,7 +346,7 @@ Mem::CleanIdlePools(void *unused) void memConfigure(void) { - size_t new_pool_limit; + int64_t new_pool_limit; /** Set to configured value first */ if (!Config.onoff.mem_pools) diff --git a/src/structs.h b/src/structs.h index 819d63029b..f0c6d7c5c6 100644 --- a/src/structs.h +++ b/src/structs.h @@ -526,7 +526,7 @@ struct SquidConfig { } retry; struct { - size_t limit; + int64_t limit; } MemPools; #if DELAY_POOLS -- 2.47.2