DescriptionOnly mark the descriptor that is valid for the map in question. If this map
transitioned from a map with a different descriptor array (or has no back
pointer), mark all valid descriptors from the start.
This fixes the following memory leak: Map A shares a descriptor array
with map B. Map B adds constant function c that in its scope holds on to
an instance of B. If the descriptor array of A would keep all the shared
descriptors alive, including c, this keeps alive both A and c
indefinitely.
This CL also fixes a bug in descriptor array trimming. When trimming
descriptor arrays we need to trim off the slack as well (thus the entire
storage); and since we are trimming a descriptor array, we need to trim
* kDescriptorSize.
Committed: https://code.google.com/p/v8/source/detail?r=13566
Patch Set 1 #Patch Set 2 : Only visit pointers of the diff between current and backpointer map. #Patch Set 3 : Added comment and rewrote so marking is agnostic to sharing internals. #
Total comments: 4
Patch Set 4 : Addressed comments #
Messages
Total messages: 3 (0 generated)
|