Skip to content

Commit

Permalink
use heapArray instead of stack allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettgu10 committed Feb 5, 2024
1 parent ed05ac1 commit 4cf5efa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/workerd/io/worker.c++
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,8 @@ static void stopProfiling(jsg::Lock& js,
}

auto hitLineCount = allNodes[i]->GetHitLineCount();
v8::CpuProfileNode::LineTick lineBuffer[hitLineCount];
allNodes[i]->GetLineTicks(lineBuffer, hitLineCount);
auto lineBuffer = kj::heapArray<v8::CpuProfileNode::LineTick>(hitLineCount);
allNodes[i]->GetLineTicks(lineBuffer.begin(), lineBuffer.size());

auto positionTicks = nodeBuilder.initPositionTicks(hitLineCount);
for (uint j=0; j < hitLineCount; j++) {
Expand Down

0 comments on commit 4cf5efa

Please sign in to comment.