Closed
Bug 632629
Opened 13 years ago
Closed 13 years ago
JM: change ExecutablePool to only hold a single chunk
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file)
9.28 KB,
patch
|
Details | Diff | Splinter Review |
Bug 631106 identified that although ExecutablePool has the infrastructure to hold multiple chunks of memory (in the confusingly called "m_pools" vector), the way it's used means that this vector always holds a single chunk... except for the fact that there's an off-by-one error in Executable::alloc() which means that a second chunk is occasionally allocated even when the requested number of bytes would have fit in the first chunk. This patch: - Changes the chunks vector into a chunk scalar. - Renames ExecutableAllocator::alloc() as fetch(), to match the fact that it's not actually doing an allocation, but just handing over the address of a previous poolForSize() call that actually does the allocation. This - fetch() is also infallible, so all call sites had their NULL checks removed. - ExecutableAllocator is now a friend of ExecutablePool, as it's the only other code that needs to see its internals, and most of ExecutablePool's fields were privatized. - Puts ExecutablePool's member decls/defns in a more sensible order. - Fixes a couple of incorrect comments in jstracer.cpp. This is a post-4.0 change.
Attachment #510854 -
Flags: review?(dvander)
Assignee | ||
Updated•13 years ago
|
Attachment #510854 -
Flags: review?(dvander)
Assignee | ||
Comment 1•13 years ago
|
||
This change isn't valid on ARM due to constant pools. See bug 631106 comment 4. Sigh.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•