���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /home/real/node-v13.0.1/deps/v8/src/heap/ |
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_HEAP_HEAP_CONTROLLER_H_ #define V8_HEAP_HEAP_CONTROLLER_H_ #include <cstddef> #include "src/heap/heap.h" #include "src/utils/allocation.h" #include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck namespace v8 { namespace internal { struct BaseControllerTrait { static constexpr size_t kMinSize = 128u * Heap::kPointerMultiplier * MB; static constexpr size_t kMaxSize = 1024u * Heap::kPointerMultiplier * MB; static constexpr double kMinGrowingFactor = 1.1; static constexpr double kMaxGrowingFactor = 4.0; static constexpr double kConservativeGrowingFactor = 1.3; static constexpr double kTargetMutatorUtilization = 0.97; }; struct V8HeapTrait : public BaseControllerTrait { static const char* kName; }; struct GlobalMemoryTrait : public BaseControllerTrait { static const char* kName; }; template <typename Trait> class V8_EXPORT_PRIVATE MemoryController : public AllStatic { public: // Computes the growing step when the limit increases. static size_t MinimumAllocationLimitGrowingStep( Heap::HeapGrowingMode growing_mode); static double GrowingFactor(Heap* heap, size_t max_heap_size, double gc_speed, double mutator_speed); static size_t CalculateAllocationLimit(Heap* heap, size_t current_size, size_t min_size, size_t max_size, size_t new_space_capacity, double factor, Heap::HeapGrowingMode growing_mode); private: static double MaxGrowingFactor(size_t max_heap_size); static double DynamicGrowingFactor(double gc_speed, double mutator_speed, double max_factor); FRIEND_TEST(MemoryControllerTest, HeapGrowingFactor); FRIEND_TEST(MemoryControllerTest, MaxHeapGrowingFactor); }; } // namespace internal } // namespace v8 #endif // V8_HEAP_HEAP_CONTROLLER_H_