19 #ifndef PAGESPEED_KERNEL_SHAREDMEM_SHARED_DYNAMIC_STRING_MAP_H_
20 #define PAGESPEED_KERNEL_SHAREDMEM_SHARED_DYNAMIC_STRING_MAP_H_
31 namespace net_instaweb {
53 size_t average_string_length,
76 void GetKeys(StringSet* strings);
114 int FindEntry(
const StringPiece&
string,
116 Entry** entry_pointer)
const;
117 Entry* GetEntry(
size_t n)
const;
118 Entry* GetFirstEntry()
const;
127 int InsertString(
const StringPiece&
string,
Entry* entry_pointer);
128 char* GetStringAtOffset(
size_t offset)
const;
132 static size_t NextPowerOfTwo(
size_t n);
204 size_t number_of_strings_;
205 size_t average_string_length_;
218 size_t mutex_offset_;
219 size_t strings_offset_;
220 size_t string_offset_offset_;
221 size_t number_inserted_offset_;
222 size_t table_offset_;
void Dump(Writer *writer, MessageHandler *message_handler)
Abstract interface for implementing a mutex.
Definition: abstract_mutex.h:28
int LookupElement(const StringPiece &string) const
Definition: shared_dynamic_string_map.h:36
int GetNumberInserted() const
Retrieve the number of strings inserted into the table.
Definition: scoped_ptr.h:30
void GetKeys(StringSet *strings)
Dumps table's strings into StringSet.
bool InitSegment(bool parent, MessageHandler *message_handler)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
SharedDynamicStringMap(size_t number_of_strings, size_t average_string_length, AbstractSharedMem *shm_runtime, const GoogleString &filename_prefix, const GoogleString &filename_suffix)
Definition: abstract_shared_mem.h:86
Definition: shared_dynamic_string_map.h:46
Interface for writing bytes to an output stream.
Definition: writer.h:29
Definition: message_handler.h:39
int IncrementElement(const StringPiece &string)
void GlobalCleanup(MessageHandler *message_handler)
Destroy shared memory segment and other relevant clean-up.