gecko-dev/memory/build
Mike Hommey 1f75d81c1c Bug 1417234 - Use SRWLock as Mutex for mozjemalloc on Windows. r=njn
SRWLock is more lightweight than CriticalSection, but is only available
on Windows Vista and more. So until we actually dropped support Windows
XP, we had to use CriticalSection.

Now that all supported Windows versions do have SRWLock, this is a
switch we can make, and not only because SRWLock is more lightweight,
but because it can be statically initialized like on other platforms,
allowing to use the same initialization code as on other platforms,
and removing the requirement for a DllMain, which in turn can allow
to statically link mozjemalloc in some cases, instead of requiring a
shared library (DllMain only works on shared libraries), or manually
call the initialization function soon enough.

There is a downside, though: SRWLock, as opposed to CriticalSection, is
not fair, meaning it can have thread scheduling implications, and can
theoretically increase latency on some threads. However, it is the
default used by Rust Mutex, meaning it's at least good enough there.
Let's see how things go with this.

--HG--
extra : rebase_source : 337dc4e245e461fd0ea23a2b6b53981346a545c6
2017-11-14 12:58:33 +09:00
..
fallback.cpp Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
Makefile.in Bug 1413570 - Disable SSE2 when building mozjemalloc on x86 during PGO profile gen phase. r=froydnj 2017-11-02 10:26:49 +09:00
malloc_decls.h Bug 1402283 - Enforce arena matching on moz_arena_{realloc,free}. r=njn 2017-11-10 16:05:24 +09:00
moz.build Bug 1396892 - fix tautological pointer comparison warning, for real; r=me 2017-10-27 16:07:47 -04:00
mozjemalloc_types.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
mozjemalloc.cpp Bug 1417234 - Use SRWLock as Mutex for mozjemalloc on Windows. r=njn 2017-11-14 12:58:33 +09:00
mozjemalloc.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
mozmemory_wrap.cpp Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
mozmemory_wrap.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
mozmemory.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
rb.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
replace_malloc_bridge.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
replace_malloc.h Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00
Utils.h Bug 1402283 - Enforce arena matching on moz_arena_{realloc,free}. r=njn 2017-11-10 16:05:24 +09:00
zone.c Bug 1413475 - Run clang-format on all files in memory/build/. r=njn 2017-11-01 17:20:54 +09:00