-
oliver@apple.com authored
Reviewed by Geoffrey Garen. Try to release unused executable memory when the FixedVMPool allocator is under pressure https://bugs.webkit.org/show_bug.cgi?id=61651 Rather than crashing when full the FixedVMPool allocator now returns a null allocation. We replace the code that used to CRASH() on null allocations with logic that asks the provided globalData to release any executable memory that it can. Currently this just means throwing away all regexp code, but in future we'll try to be more aggressive. * assembler/ARMAssembler.cpp: (JSC::ARMAssembler::executableCopy): * assembler/ARMAssembler.h: * assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::executableCopy): * assembler/AssemblerBufferWithConstantPool.h: * assembler/LinkBuffer.h: (JSC::LinkBuffer::LinkBuffer): (JSC::LinkBuffer::linkCode): * assembler/MIPSAssembler.h: (JSC::MIPSAssembler::executableCopy): * assembler/SH4Assembler.h: (JSC::SH4Assembler::executableCopy): * assembler/X86Assembler.h: (JSC::X86Assembler::executableCopy): (JSC::X86Assembler::X86InstructionFormatter::executableCopy): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::compileFunction): * jit/ExecutableAllocator.h: (JSC::ExecutablePool::create): (JSC::ExecutablePool::alloc): (JSC::ExecutableAllocator::ExecutableAllocator): (JSC::ExecutableAllocator::poolForSize): (JSC::ExecutablePool::ExecutablePool): (JSC::ExecutablePool::poolAllocate): * jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::FixedVMPoolAllocator::alloc): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): (JSC::JIT::privateCompileCTINativeCall): * jit/JITPropertyAccess.cpp: (JSC::JIT::stringGetByValStubGenerator): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain): * jit/JITPropertyAccess32_64.cpp: (JSC::JIT::stringGetByValStubGenerator): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain): * jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::finalize): * jit/ThunkGenerators.cpp: (JSC::charCodeAtThunkGenerator): (JSC::charAtThunkGenerator): (JSC::fromCharCodeThunkGenerator): (JSC::sqrtThunkGenerator): (JSC::powThunkGenerator): * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): (JSC::JSGlobalData::releaseExecutableMemory): (JSC::releaseExecutableMemory): * runtime/JSGlobalData.h: * runtime/RegExpCache.cpp: (JSC::RegExpCache::invalidateCode): * runtime/RegExpCache.h: * yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::compile): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7e98c92d