net_instaweb::NullSharedMem Class Reference

#include "null_shared_mem.h"

Inheritance diagram for net_instaweb::NullSharedMem:
net_instaweb::AbstractSharedMem

List of all members.

Public Member Functions

virtual size_t SharedMutexSize () const
 Size of mutexes inside shared memory segments.
virtual AbstractSharedMemSegmentCreateSegment (const GoogleString &name, size_t size, MessageHandler *handler)
virtual AbstractSharedMemSegmentAttachToSegment (const GoogleString &name, size_t size, MessageHandler *handler)
virtual void DestroySegment (const GoogleString &name, MessageHandler *handler)

Detailed Description

A stub implementation of shared memory for systems where we do not have a real one. Fails all the operations.


Member Function Documentation

virtual AbstractSharedMemSegment* net_instaweb::NullSharedMem::AttachToSegment ( const GoogleString name,
size_t  size,
MessageHandler handler 
) [virtual]

Attaches to an existing segment, which must have been created already. May return NULL on failure

Implements net_instaweb::AbstractSharedMem.

virtual AbstractSharedMemSegment* net_instaweb::NullSharedMem::CreateSegment ( const GoogleString name,
size_t  size,
MessageHandler handler 
) [virtual]

This should be called upon main process/thread initialization to create a shared memory segment that will be accessed by other processes/threads as identified by a unique name (via AttachToSegment). It will remove any previous segment with the same name. The memory will be zeroed out.

May return NULL on failure.

Implements net_instaweb::AbstractSharedMem.

virtual void net_instaweb::NullSharedMem::DestroySegment ( const GoogleString name,
MessageHandler handler 
) [virtual]

Cleans up the segment with given name. You should call this after there is no longer any need for AttachToSegment to succeed.

Implements net_instaweb::AbstractSharedMem.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:13 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3