Closed
Bug 1417234
Opened 7 years ago
Closed 7 years ago
Use SRWLock as Mutex for mozjemalloc on Windows
Categories
(Core :: Memory Allocator, enhancement)
Core
Memory Allocator
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
No description provided.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8928302 [details] Bug 1417234 - Use SRWLock as Mutex for mozjemalloc on Windows. https://reviewboard.mozilla.org/r/199518/#review204666 ::: memory/build/mozjemalloc.cpp (Diff revision 2) > -{ > - switch (reason) { > - case DLL_PROCESS_ATTACH: > - // Don't force the system to page DllMain back in every time > - // we create/destroy a thread > - DisableThreadLibraryCalls(hModule); DisableThreadLibraryCalls should be called regardless of this change.
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8928302 [details] Bug 1417234 - Use SRWLock as Mutex for mozjemalloc on Windows. https://reviewboard.mozilla.org/r/199518/#review204672 Ok by me. I don't know enough about DisableThreadLibraryCalls() to have an opinion on emk's suggestion.
Attachment #8928302 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #3) > Comment on attachment 8928302 [details] > Bug 1417234 - Use SRWLock as Mutex for mozjemalloc on Windows. > > https://reviewboard.mozilla.org/r/199518/#review204666 > > ::: memory/build/mozjemalloc.cpp > (Diff revision 2) > > -{ > > - switch (reason) { > > - case DLL_PROCESS_ATTACH: > > - // Don't force the system to page DllMain back in every time > > - // we create/destroy a thread > > - DisableThreadLibraryCalls(hModule); > > DisableThreadLibraryCalls should be called regardless of this change. DllMain is only ever called for the dll it resides in. Meaning that DisableThreadLibraryCalls is only ever called here for the dll mozjemalloc resides in. DisableThreadLibraryCalls avoids that DllMain function to be called for DLL_THREAD_ATTACH and DLL_THREAD_DETACH notifications. The only other thing that this DllMain function did is call malloc_init_hard, which goes away. Thus there's nothing left for that DllMain to do in any situation. Removing the function makes it never called, which is a superset of what DisableThreadLibraryCalls did.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/5b8cbab9374f Use SRWLock as Mutex for mozjemalloc on Windows. r=njn
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5b8cbab9374f
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 8•7 years ago
|
||
noise |
https://hg.mozilla.org/projects/oak/rev/5b8cbab9374f065bf4cac694d5ad251f2134bb37 Bug 1417234 - Use SRWLock as Mutex for mozjemalloc on Windows. r=njn
You need to log in
before you can comment on or make changes to this bug.
Description
•