Closed
Bug 1355406
Opened 8 years ago
Closed 8 years ago
Change the type of MediaCacheStream::mPartialBlockBuffer to UniquePtr<uint8_t[]>
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Since bug 969114 moves mPartialBlockBuffer to a separate heap allocation, we don't need int64_t for proper alignment (the memory return by malloc() is always properly aligned).
Changing the type to UniquePtr<uint8_t[]> also saves some reinterpret_casts.
Assignee | ||
Updated•8 years ago
|
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8857739 -
Flags: review?(gsquelart)
Assignee | ||
Updated•8 years ago
|
Attachment #8857739 -
Flags: review?(gsquelart) → review?(jyavenard)
Assignee | ||
Comment 2•8 years ago
|
||
Looks like Gerald is on vacation.
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8857739 [details]
Bug 1355406 - Change the type of MediaCacheStream::mPartialBlockBuffer to UniquePtr<uint8_t[]>.
https://reviewboard.mozilla.org/r/129698/#review132832
::: commit-message-efa44:4
(Diff revision 1)
> +Bug 1355406 - Change the type of MediaCacheStream::mPartialBlockBuffer to UniquePtr<uint8_t[]>.
> +
> +Since bug 969114 moves mPartialBlockBuffer to a separate heap allocation,
> +we don't need int64_t for proper alignment for the memory returned by
What do you mean by alignment, memory alignement? If so that is not correct.
jemalloc do not align data.
AFAIK, only malloc on mac returns an aligned buffer
If your changes rely on malloc returning a memory aligned block, then it wont work
Assignee | ||
Comment 4•8 years ago
|
||
https://reviewboard-hg.mozilla.org/gecko/rev/329adb8a4414f32e2f83ba79af06d288d7b25705#l2.16
MakeUnique<> invokes the new operator which returns a memory block which is at least int64_t aligned. Is that correct?
Flags: needinfo?(nfroyd)
Comment 5•8 years ago
|
||
I'm certain it is not aligned. It's platform specific, and more often than not, jemalloc does not align memory.
Hence why we had to have things like AlignedBuffer.
This was confirmed by :njn
Assignee | ||
Comment 6•8 years ago
|
||
Nah, AlignedBuffer is used for higher alignment requirement that is not provided by new/malloc like 32byte or 64byte alignment.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(nfroyd)
Comment 8•8 years ago
|
||
mozreview-review |
Comment on attachment 8857739 [details]
Bug 1355406 - Change the type of MediaCacheStream::mPartialBlockBuffer to UniquePtr<uint8_t[]>.
https://reviewboard.mozilla.org/r/129698/#review132940
Attachment #8857739 -
Flags: review?(jyavenard) → review+
Assignee | ||
Comment 9•8 years ago
|
||
Thanks!
Comment 10•8 years ago
|
||
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3985a21e25a3
Change the type of MediaCacheStream::mPartialBlockBuffer to UniquePtr<uint8_t[]>. r=jya
Comment 11•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•