-
ggaren@apple.com authored
Reviewed by Oliver Hunt. REGRESSION [r78794-r79249] Allocation of memory is slow when number of active objects is large https://bugs.webkit.org/show_bug.cgi?id=56823 Partial fix for most of the problem. (TOT still shows a regression, though.) * runtime/Heap.cpp: (JSC::Heap::reportExtraMemoryCostSlowCase): Use highWaterMark(), instead of capacity(), since capacity() is O(n) relative to the size of the heap. In limited circumstances, capacity() is also worse than highWaterMark() for measuring extra cost relative to heap size, since capacity() only measures the *current* capacity of the heap, but the heap will grow if necessary to attain highWaterMark(). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a54a9660