Closed Bug 978498 Opened 6 years ago Closed 6 years ago

SharedArrayBuffer(ARM, x86): align the start of the data to a page boundary, and fix a memory leak.

Categories

(Core :: JavaScript Engine: JIT, defect)

ARM
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: dougc, Assigned: dougc)

References

Details

Attachments

(1 file)

For the ARM and x86, the data or elements of a SharedArrayBuffer could be easily aligned to a page boundary. This might be a prudent constraint to implement now.  It will be needed for the buffer.discard() feature in bug 855669, and could alternatively be bundled in there.
Assignee: nobody → dtc-moz
Attachment #8384194 - Flags: review?(sstangl)
Comment on attachment 8384194 [details] [diff] [review]
Align the start of the data to a page boundary, and fix a memory leak.

Review of attachment 8384194 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/vm/SharedArrayObject.cpp
@@ +120,3 @@
>          UnmapMemory(p, AsmJSMappedSize);
>  #else
> +        UnmapMemory(p, this->length + AsmJSPageSize);

Good catch!
Attachment #8384194 - Flags: review?(sstangl) → review+
Keywords: checkin-needed
Summary: SharedArrayBuffer(ARM, x86): align the start of the data to a page boundary. → SharedArrayBuffer(ARM, x86): align the start of the data to a page boundary, and fix a memory leak.
https://hg.mozilla.org/mozilla-central/rev/5dd4f9dba66e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Duplicate of this bug: 977860
You need to log in before you can comment on or make changes to this bug.