Closed
Bug 718885
Opened 14 years ago
Closed 14 years ago
Optimize memory initialization on ByteArray growth
Categories
(Tamarin Graveyard :: API, defect)
Tamarin Graveyard
API
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: turo, Assigned: pnkfelix)
Details
Attachments
(1 file)
|
1.11 KB,
patch
|
pnkfelix
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22
Steps to reproduce:
I was profiling several ByteArray heavy applications.
Actual results:
memset shows up as the #3 call in the totals list and the source of that is ByteArray::Grower::EnsureWritableCapacity(uint32_t minimumCapacity) which allocates a new buffer with the MMgc::kCanFailAndZero attribute. This will needlessly zero the entire buffer.
Expected results:
The code can be easily optimized to only zero the memory areas which will not be overwritten by the old data. See attached patch.
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → fklockii
| Assignee | ||
Updated•14 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Updated•14 years ago
|
Attachment #589347 -
Attachment is patch: true
| Assignee | ||
Comment 1•14 years ago
|
||
Comment on attachment 589347 [details] [diff] [review]
ByteArrayMemsetPatch.txt
will push
Attachment #589347 -
Flags: review+
Comment 2•14 years ago
|
||
changeset: 7192:d0f8ed436179
user: Tinic Uro <turo@adobe.com>
summary: Bug 718885: only zero the memory areas which will not be overwritten by the old data (r=fklockii).
http://hg.mozilla.org/tamarin-redux/rev/d0f8ed436179
| Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•