-
ggaren@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=87039 Reviewed by Darin Adler. ../JavaScriptCore: This helps avoid OOM crashes on small platforms, and helps avoid "too much GC" performance issues on big platforms. * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::collect): * heap/Heap.h: (Heap): GC balances between a fixed minimum and a proportional multiplier, which are limited based on system RAM. * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): (JSC::JSGlobalData::createContextGroup): (JSC::JSGlobalData::create): (JSC::JSGlobalData::createLeaked): * runtime/JSGlobalData.h: (JSGlobalData): Renamed HeapSize to HeapType because the exact size is influenced by the heap type, but not determined by it. ../WTF: Added a helper function for measuring system RAM. * GNUmakefile.list.am: * WTF.gypi: * WTF.pro: * WTF.vcproj/WTF.vcproj: * WTF.xcodeproj/project.pbxproj: * wtf/AmountOfRAM.cpp: Added. (WTF): (WTF::computeAmountOfRAM): (WTF::amountOfRAM): * wtf/AmountOfRAM.h: Added. (WTF): * wtf/CMakeLists.txt: * wtf/StdLibExtras.h: (WTF): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9a070935