Expose stall-and-retry logic for use by other allocators
Categories
(Core :: Memory Allocator, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: rkraesig, Assigned: rkraesig)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
In bug 1794059 it was noted that shared memory allocation attempts would also benefit from a stall-and-retry mechanism.
We should probably extract and expose the one from mozjemalloc to avoid duplication of effort.
Assignee | ||
Comment 1•1 year ago
|
||
The real ::VirtualAlloc does not modify the existing last-error code in
case of success; therefore, neither should we.
Assignee | ||
Comment 2•1 year ago
|
||
In bug 1794059 it was noted that the IPC shared-memory allocation code
would like to be able to stall-and-retry as well using the same logic.
While it doesn't use VirtualAlloc, the principle is otherwise the same.
Shuffle the relevant code around so that the stall-and-retry logic is
separate from the allocation, in preparation for exporting it.
Depends on D164105
Assignee | ||
Comment 3•1 year ago
|
||
Extract the stall-and-retry logic to a header.
Additionally, expose and export GetStallSpecs(), so that other memory-
allocation mechanisms can easily remain consistent therewith if desired.
Depends on D164106
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
Export GetStallSpecs
as mozilla::GetAllocatorStallSpecs
, when it exists.
Depends on D164107
Pushed by rkraesig@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a05c18f43067 [1/4] Handle Windows error code consistently r=glandium https://hg.mozilla.org/integration/autoland/rev/180af13cd33f [2/4] Factor out the stall logic in preparation for export r=glandium https://hg.mozilla.org/integration/autoland/rev/3131f330b55d [3/4] Expose stall-and-retry code beyond mozjemalloc.cpp r=glandium https://hg.mozilla.org/integration/autoland/rev/54dd0be202ef [4/4] Expose allocator's stall-specs beyond mozjemalloc.cpp r=glandium
Comment 6•1 year ago
|
||
Backed out for causing SM bustages.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=402893096&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/61cf06758f742501f0320d69c4c793ab44308431
Assignee | ||
Comment 7•1 year ago
|
||
A header was incorrectly included only conditionally. Attempting reland following a successful try build.
Pushed by rkraesig@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/edb20d240a8a [1/4] Handle Windows error code consistently r=glandium https://hg.mozilla.org/integration/autoland/rev/111bc058d516 [2/4] Factor out the stall logic in preparation for export r=glandium https://hg.mozilla.org/integration/autoland/rev/c08d6adb592e [3/4] Expose stall-and-retry code beyond mozjemalloc.cpp r=glandium https://hg.mozilla.org/integration/autoland/rev/6410cf79dcc1 [4/4] Expose allocator's stall-specs beyond mozjemalloc.cpp r=glandium
Comment 9•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/edb20d240a8a
https://hg.mozilla.org/mozilla-central/rev/111bc058d516
https://hg.mozilla.org/mozilla-central/rev/c08d6adb592e
https://hg.mozilla.org/mozilla-central/rev/6410cf79dcc1
Description
•