]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not create shared memory pools if caching is disabled.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 14 Apr 2011 22:19:10 +0000 (16:19 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 14 Apr 2011 22:19:10 +0000 (16:19 -0600)
Ipc::Mem::PagePool cannot handle zero capacity well.

src/ipc/mem/Pages.cc

index dad5f8ca03a99350777db8dd48ed273cf1473d9c..53f082a4a055d69ba18015f1fed03927afeb40c0 100644 (file)
@@ -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