From: Alex Rousskov Date: Wed, 11 May 2011 22:27:19 +0000 (-0600) Subject: Removed stale IamWorkerProcess() check and XXX: Caller checks that already. X-Git-Tag: take07~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed5d80d30ecb84ca0ad5f7b3312556994a7bb38a;p=thirdparty%2Fsquid.git Removed stale IamWorkerProcess() check and XXX: Caller checks that already. Polished. --- diff --git a/src/MemStore.cc b/src/MemStore.cc index 8674474819..1515436596 100644 --- a/src/MemStore.cc +++ b/src/MemStore.cc @@ -33,18 +33,17 @@ MemStore::init() { if (entryLimit <= 0) return; // no memory cache configured or a misconfiguration - if (IamWorkerProcess()) { // XXX: coordinator should not create MemStore - const int64_t diskMaxSize = Store::Root().maxObjectSize(); - if (diskMaxSize == -1) { - debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size " - "is unlimited but mem-cache maximum object size is " << - Ipc::Mem::PageSize() / 1024.0 << " KB"); - } else if (diskMaxSize > maxObjectSize()) { - debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size " - "is too large for mem-cache: " << - diskMaxSize / 1024.0 << " KB > " << - maxObjectSize() / 1024.0 << " KB"); - } + const int64_t diskMaxSize = Store::Root().maxObjectSize(); + const int64_t memMaxSize = maxObjectSize(); + if (diskMaxSize == -1) { + debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size " + "is unlimited but mem-cache maximum object size is " << + memMaxSize / 1024.0 << " KB"); + } else if (diskMaxSize > memMaxSize) { + debugs(20, DBG_IMPORTANT, "WARNING: disk-cache maximum object size " + "is too large for mem-cache: " << + diskMaxSize / 1024.0 << " KB > " << + memMaxSize / 1024.0 << " KB"); } map = new MemStoreMap(ShmLabel);