Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
inprocess_shared_mem.h
Go to the documentation of this file.
1 // Copyright 2011 Google Inc.
16 
17 #ifndef PAGESPEED_KERNEL_SHAREDMEM_INPROCESS_SHARED_MEM_H_
18 #define PAGESPEED_KERNEL_SHAREDMEM_INPROCESS_SHARED_MEM_H_
19 
20 #include <cstddef>
21 #include <map>
22 
26 
27 namespace net_instaweb {
28 
29 class MessageHandler;
30 class ThreadSystem;
31 
39  public:
41  explicit InProcessSharedMem(ThreadSystem* thread_system);
42  virtual ~InProcessSharedMem();
43 
46  virtual size_t SharedMutexSize() const;
48  const GoogleString& name, size_t size, MessageHandler* handler);
50  const GoogleString& name, size_t size, MessageHandler* handler);
51  virtual void DestroySegment(const GoogleString& name,
52  MessageHandler* handler);
53 
54  private:
55  class DelegateMutex;
56  class DelegateSegment;
57  class Segment;
58  typedef std::map<GoogleString, Segment*> SegmentMap;
59 
60  ThreadSystem* thread_system_;
61  SegmentMap segments_;
62 
63 
64 };
65 
66 }
67 
68 #endif
InProcessSharedMem(ThreadSystem *thread_system)
Does not take ownership of thread_system.
virtual size_t SharedMutexSize() const
virtual void DestroySegment(const GoogleString &name, MessageHandler *handler)
Definition: inprocess_shared_mem.h:38
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: abstract_shared_mem.h:86
Definition: thread_system.h:40
Definition: message_handler.h:39
virtual AbstractSharedMemSegment * AttachToSegment(const GoogleString &name, size_t size, MessageHandler *handler)
Definition: abstract_shared_mem.h:31
virtual AbstractSharedMemSegment * CreateSegment(const GoogleString &name, size_t size, MessageHandler *handler)