-
akling@apple.com authored
<http://webkit.org/b/108410> <rdar://problem/13124002> Source/JavaScriptCore: Patch by Filip Pizlo <fpizlo@apple.com> on 2013-01-30 Reviewed by Benjamin Poulain. Remove assertion about Vector capacity that won't hold anymore since capacity() may not be what you passed to reserveCapacity(). * bytecode/CodeBlock.cpp: (JSC::CodeBlock::CodeBlock): Source/WTF: Reviewed by Benjamin Poulain. Added WTF::fastMallocGoodSize(), a workalike/wrapper for OS X's malloc_good_size(). It returns the actual size of the block that will get allocated for a given byte size. Vector's internal buffer now checks with the allocator if the resulting allocation could actually house more objects and updates its capacity to make use of the space. * wtf/Deque.h: (WTF::::expandCapacity): * wtf/FastMalloc.cpp: (WTF::fastMallocGoodSize): * wtf/FastMalloc.h: * wtf/Vector.h: (WTF::VectorBufferBase::allocateBuffer): (WTF::VectorBufferBase::tryAllocateBuffer): (WTF::VectorBufferBase::reallocateBuffer): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7e8225b7