Page Speed Optimization Libraries
1.13.35.1
|
#include "inprocess_shared_mem.h"
Public Member Functions | |
InProcessSharedMem (ThreadSystem *thread_system) | |
Does not take ownership of thread_system. | |
virtual size_t | SharedMutexSize () const |
virtual AbstractSharedMemSegment * | CreateSegment (const GoogleString &name, size_t size, MessageHandler *handler) |
virtual AbstractSharedMemSegment * | AttachToSegment (const GoogleString &name, size_t size, MessageHandler *handler) |
virtual void | DestroySegment (const GoogleString &name, MessageHandler *handler) |
Public Member Functions inherited from net_instaweb::AbstractSharedMem | |
virtual bool | IsDummy () |
This class emulates the normally cross-process shared memory API within a single process on top of threading APIs, in order to permit deploying classes built for shared memory into single-process servers or tests. Note, however, that a direct implementation taking advantage of much simpler in-process programming model may be far superior.
|
virtual |
Attaches to an existing segment, which must have been created already. May return NULL on failure
Implements net_instaweb::AbstractSharedMem.
|
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 |
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.
|
virtual |
All the methods here implement the AbstractSharedMem API — see the base class for their docs.
Implements net_instaweb::AbstractSharedMem.