Speculative fix for stack overflow in CollectEvacuationCandidates
authorjkummerow <jkummerow@chromium.org>
Fri, 10 Apr 2015 11:24:25 +0000 (04:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Apr 2015 11:24:24 +0000 (11:24 +0000)
commit052924abe3fb44df588f6e7c7df9ca691bbfa887
tree7d9ec114d66cd4c143508238fcd98e52db6c90a3
parentd8679a2350ace9cc29667b3e0ad9ab87f02b6793
Speculative fix for stack overflow in CollectEvacuationCandidates

I don't have a repro, but it seems that when we are close to the stack limit,
CollectEvacuationCandidates' local variables can blow the limit. To avoid
this, instead of always allocating a 2000-pointer-sizes array on the stack,
use a std::vector (which stores its elements on the heap), and while we're
at it, only allocate as many elements as we actually need.

Review URL: https://codereview.chromium.org/1073123002

Cr-Commit-Position: refs/heads/master@{#27742}
src/heap/mark-compact.cc