void MemStoreRr::run(const RunnerRegistry &)
{
- // XXX: restore if (!UsingSmp()) return;
+ if (!UsingSmp())
+ return;
if (IamMasterProcess())
MemStore::Init();
MemStoreRr::~MemStoreRr()
{
- // XXX: restore if (!UsingSmp()) return;
+ if (!UsingSmp())
+ return;
if (IamMasterProcess())
MemStoreMap::Unlink(ShmLabel);
void SharedMemPagesRr::run(const RunnerRegistry &)
{
- // XXX: restore if (!UsingSmp()) return;
+ if (!UsingSmp())
+ return;
// When cache_dirs start using shared memory pages, they would
// need to communicate their needs to us somehow.
SharedMemPagesRr::~SharedMemPagesRr()
{
+ if (!UsingSmp())
+ return;
+
delete ThePagePool;
ThePagePool = NULL;
if (IamMasterProcess())
* offset 0 in the memory object is the HTTP headers.
*/
- if (/* XXX: restore: UsingSmp() && */ mem_status == IN_MEMORY) {
+ if (mem_status == IN_MEMORY && UsingSmp()) {
// clients of an object cached in shared memory are memory clients
return STORE_MEM_CLIENT;
}
if (new_status == mem_status)
return;
- // XXX: restore: if (UsingSmp())
- {
+ if (UsingSmp()) {
assert(new_status != IN_MEMORY); // we do not call this otherwise
// This method was designed to update replacement policy, not to
// actually purge something from the memory cache (TODO: rename?).
void
StoreController::init()
{
- // XXX: add: if (UsingSmp())
- memStore = new MemStore;
- memStore->init();
+ if (UsingSmp() && IamWorkerProcess()) {
+ memStore = new MemStore;
+ memStore->init();
+ }
swapDir->init();