gecko-dev/mfbt
Kris Maglione 2bbae5374b Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm
This class implements a shared memory key-value store that fits into a single
memory mapped segment. All of the runtime data for its instances are stored in
the shared memory region, which means that memory overhead for each instance
in each process is only a few bytes.

Importantly, the key and value strings returned by this class are also
pointers into the shared memory region, which means that once an instance is
created, its memory cannot be unmapped until process shutdown.

For the uses I intend to put it to, this is a reasonable constraint. If we
need to use it for shorter-lived maps in the future, we can add an option to
return non-literal dependent strings that will be copied if they need to be
kept alive long term.

MozReview-Commit-ID: 5BwAaDsb7HS

--HG--
extra : rebase_source : b472fe628018f88a2c4d6b3de4b7143aeca55e14
extra : absorb_source : 5cdeb568cfd2b4a5a767191402e699e61e653b3b
2018-06-29 22:50:41 -07:00
..
decimal Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE 2018-02-21 10:15:43 +02:00
double-conversion Bug 1465808 - Update double-conversion to latest upstream. rs=froydnj 2018-06-12 22:12:42 -07:00
tests Bug 1453795 - MFTB - Initialize member fields in classes/ structures. r=waldo 2018-06-15 13:49:31 +03:00
Algorithm.h Bug 1449094 - Implement constexpr mozilla::AllOf. r=froydnj 2018-03-28 00:01:08 +09:00
Alignment.h Bug 1435382 - fix documentation for AlignedElem; r=me 2018-02-02 15:24:51 -05:00
AllocPolicy.h
AlreadyAddRefed.h Bug 1470641 - Update already_AddRefed constructor comment. r=froydnj 2018-06-22 23:25:19 -07:00
Array.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
ArrayUtils.h
Assertions.cpp
Assertions.h Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen 2018-04-05 11:42:23 +02:00
Atomics.h Bug 1407137 - Implement Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete; to remove an actually-non-atomic footgun. r=froydnj 2017-10-10 10:19:31 -07:00
Attributes.h Bug 1451248. r=jorendorff, r=bz 2018-04-25 19:40:09 -07:00
BinarySearch.h
BloomFilter.h
BufferList.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
Casting.h Bug 1465981 - Use memcpy instead of union-arm-punning (which has implementation-defined, desired behavior with gcc and presumably clang, and is not known to have problems on MSVC, but potentially could with other compilers) in BitwiseCast. r=froydnj 2018-06-06 16:03:47 -07:00
ChaosMode.cpp
ChaosMode.h
Char16.h Bug 1428541 - Make char16ptr_t::operator bool() explicit. r=froydnj 2017-12-24 23:33:56 +09:00
CheckedInt.h Bug 1356936 - Use __builtin_add/sub/mul_overflow() where available to optimize CheckedInt. r=waldo,ehsan 2017-09-21 18:24:10 +02:00
Compiler.h
Compression.cpp Bug 1416183 - Build LZ4 as C instead of including it as C++. r=froydnj 2017-11-15 12:51:01 +09:00
Compression.h Bug 1396026 - Update OTS to accept Awami Nastaliq. r=froydnj,jfkthame 2017-09-07 10:40:59 -07:00
DebugOnly.h
DefineEnum.h
DoublyLinkedList.h Bug 1396723 - Use DoublyLinkedList in mozjemalloc. r=froydnj 2017-09-02 08:55:42 +09:00
EndianUtils.h Bug 1413049 - Part 1: Add methods to EndianUtils for pointer-sized integers. r=Waldo. 2018-03-01 11:05:13 -06:00
EnumSet.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
EnumTypeTraits.h Bug 1427229 - Perform validation when sending an EnumSet over IPC. r=botond,froydnj 2018-01-21 21:23:21 +01:00
EnumeratedArray.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
EnumeratedRange.h
FStream.h Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj 2018-06-26 13:06:17 +02:00
FastBernoulliTrial.h
FloatingPoint.cpp Bug 1438212 - Implement mozilla::IsFloat32Representable using an algorithm that handles NaN correctly and doesn't sometimes invoke undefined behavior. r=froydnj 2018-06-06 16:03:47 -07:00
FloatingPoint.h Bug 1438212 - Implement mozilla::IsFloat32Representable using an algorithm that handles NaN correctly and doesn't sometimes invoke undefined behavior. r=froydnj 2018-06-06 16:03:47 -07:00
GuardObjects.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
HashFunctions.cpp
HashFunctions.h Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout 2018-04-16 21:41:03 +03:00
IntegerPrintfMacros.h
IntegerRange.h
IntegerTypeTraits.h
JSONWriter.cpp
JSONWriter.h Bug 1467759 - Escape all the property names in JSONWriter. r=froydnj 2018-06-08 19:50:25 +02:00
Likely.h
LinkedList.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
LinuxSignal.h Backed out changeset 98e368b5c4be (bug 1463035) for failures in tools/profiler/tests/chrome/test_profile_worker.html on a CLOSED TREE 2018-05-22 03:16:44 +03:00
MacroArgs.h
MacroForEach.h
MathAlgorithms.h Bug 1443342 - Remove HashFunctions.h's RotateBitsLeft32 and use the general RotateLeft function instead. r=froydnj 2018-03-01 17:05:58 -08:00
Maybe.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
MaybeOneOf.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
MemoryChecking.h
MemoryReporting.h
Move.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
NonDereferenceable.h Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj 2018-03-28 17:48:53 +11:00
NotNull.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
NullPtr.h
Opaque.h
OperatorNewExtensions.h
Pair.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
Path.h Bug 1428543 - Add mozilla::filesystem::Path and use it in nsIFile. r=froydnj 2017-12-28 03:03:35 +09:00
PodOperations.h
Poison.cpp
Poison.h Bug 1467048 - Add a version of CorruptionCanary for statics. r=froydnj 2018-06-06 14:50:17 -07:00
Range.h
RangedArray.h
RangedPtr.h Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm 2018-06-29 22:50:41 -07:00
ReentrancyGuard.h
RefCountType.h
RefCounted.h Bug 1385438 - make mozilla::RefCounted use the strongest memory consistency necessary; r=jrmuizel 2017-10-27 13:05:51 -04:00
RefPtr.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
Result.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
ResultExtensions.h Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan 2017-08-29 21:28:31 -07:00
ReverseIterator.h
RollingMean.h
SHA1.cpp
SHA1.h
SPSCQueue.h Bug 1454385 - Add a single producer single consumer lock and wait free queue to mfbt/. r=froydnj 2018-04-13 17:14:05 +02:00
STYLE
Saturate.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
ScopeExit.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
Scoped.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
SegmentedVector.h Bug 1469003 - Convert SegmentedVector to use a manually aligned |unsigned char| array for storage, using a clean C++11 idiom. r=froydnj 2018-06-18 11:55:41 -07:00
SharedLibrary.h Bug 1442275 - Implement a path charset agnostic wrapper for PR_LoadLibraryWithFlags. r=froydnj 2018-04-24 00:31:53 +09:00
SmallPointerArray.h Bug 1466928 - Make mozilla::SmallPointerArray compatible with the C++ object model. r=froydnj 2018-06-07 03:53:54 -07:00
Span.h Bug 1466475 - Make mozilla::Span produce aligned bogus pointers per new Rust rules. r=froydnj 2018-06-04 12:59:46 +03:00
SplayTree.h bug 1464999 - make SplayTree.remove clear mRight and mLeft r=froydnj 2018-05-29 09:41:24 +02:00
Sprintf.h
StaticAnalysisFunctions.h Bug 1444416: Handle references in the "can run script" checker. r=mystor 2018-03-09 17:51:59 +01:00
TaggedAnonymousMemory.cpp
TaggedAnonymousMemory.h
TemplateLib.h
TextUtils.h Bug 1467336 - Implement mozilla::IsAscii to detect pure ASCII characters. r=froydnj 2018-06-07 02:17:10 -07:00
ThreadLocal.h Bug 1460645 Avoid the thread_local keyword for MinGW and instead use __thread r=froydnj 2018-05-10 11:11:19 -05:00
ThreadSafeWeakPtr.h Bug 1404742 - add ThreadSafeWeakPointer to MFBT. r=nfroyd 2017-10-18 14:21:23 -04:00
ToString.h
Tuple.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
TypeTraits.h
TypedEnumBits.h
Types.h Bug 1277338 - Part 7: Export mozglue when JS_STANDALONE && !jemalloc; r=glandium,sfink 2017-08-31 15:59:13 -07:00
UniquePtr.h Bug 1466909 - Use AddLvalueReference for UniquePtr's operator*(). r=froydnj 2018-06-07 07:27:22 -07:00
UniquePtrExtensions.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
Unused.cpp
Unused.h
Variant.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
Vector.h Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj 2018-06-02 09:33:26 +02:00
WeakPtr.h
WindowsVersion.h Bug 1460057: Update WindowsVersion with latest Windows 10 build numbers; r=froydnj 2018-05-07 17:24:51 -06:00
WrappingOperations.h Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden 2018-03-08 10:27:14 +11:00
XorShift128PlusRNG.h Bug 1443342 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj 2018-03-06 09:33:52 -08:00
lz4.c Bug 1460316 - Update lz4 to version 1.8.2. r=froydnj 2018-05-09 12:16:28 -04:00
lz4.h Bug 1460316 - Update lz4 to version 1.8.2. r=froydnj 2018-05-09 12:16:28 -04:00
moz.build Bug 1454385 - Add a single producer single consumer lock and wait free queue to mfbt/. r=froydnj 2018-04-13 17:14:05 +02:00