From: Alex Rousskov Date: Thu, 14 Apr 2011 22:19:10 +0000 (-0600) Subject: Do not create shared memory pools if caching is disabled. X-Git-Tag: take06~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fbeec6b5f221719832c5e113dfa2f0a1f8646e2;p=thirdparty%2Fsquid.git Do not create shared memory pools if caching is disabled. Ipc::Mem::PagePool cannot handle zero capacity well. --- diff --git a/src/ipc/mem/Pages.cc b/src/ipc/mem/Pages.cc index dad5f8ca03..53f082a4a0 100644 --- a/src/ipc/mem/Pages.cc +++ b/src/ipc/mem/Pages.cc @@ -91,6 +91,11 @@ void SharedMemPagesRr::run(const RunnerRegistry &) { // XXX: restore if (!UsingSmp()) return; + // When cache_dirs start using shared memory pages, they would + // need to communicate their needs to us somehow. + if (!Ipc::Mem::Limit()) + return; + if (IamMasterProcess()) Ipc::Mem::Init(); else