FixedVMPoolExecutableAllocator() : MetaAllocator(32) // round up all allocations to 32 bytes { m_reservation = PageReservation::reserveWithGuardPages(fixedPoolSize, OSAllocator::JSJITCodePages, EXECUTABLE_POOL_WRITABLE, true); #if !ENABLE(CLASSIC_INTERPRETER) if (!m_reservation) CRASH(); #endif if (m_reservation) { ASSERT(m_reservation.size() == fixedPoolSize); addFreshFreeSpace(m_reservation.base(), m_reservation.size()); } }
FixedVMPoolExecutableAllocator() : MetaAllocator(jitAllocationGranule) // round up all allocations to 32 bytes { m_reservation = PageReservation::reserveWithGuardPages(fixedExecutableMemoryPoolSize, OSAllocator::JSJITCodePages, EXECUTABLE_POOL_WRITABLE, true); #if !ENABLE(LLINT) RELEASE_ASSERT(m_reservation); #endif if (m_reservation) { ASSERT(m_reservation.size() == fixedExecutableMemoryPoolSize); addFreshFreeSpace(m_reservation.base(), m_reservation.size()); startOfFixedExecutableMemoryPool = reinterpret_cast<uintptr_t>(m_reservation.base()); } }
SuperRegion::SuperRegion() : MetaAllocator(Region::s_regionSize, Region::s_regionSize) , m_reservationBase(0) { #if ENABLE(SUPER_REGION) // Over-allocate so that we can make sure that we're aligned to the size of Regions. m_reservation = PageReservation::reserve(s_fixedHeapMemoryPoolSize + Region::s_regionSize, OSAllocator::JSGCHeapPages); m_reservationBase = getAlignedBase(m_reservation); addFreshFreeSpace(m_reservationBase, s_fixedHeapMemoryPoolSize); #else UNUSED_PARAM(m_reservation); UNUSED_PARAM(m_reservationBase); #endif }
FixedVMPoolExecutableAllocator() : MetaAllocator(jitAllocationGranule) // round up all allocations to 32 bytes { size_t reservationSize; if (Options::jitMemoryReservationSize()) reservationSize = Options::jitMemoryReservationSize(); else reservationSize = fixedExecutableMemoryPoolSize; reservationSize = roundUpToMultipleOf(pageSize(), reservationSize); m_reservation = PageReservation::reserveWithGuardPages(reservationSize, OSAllocator::JSJITCodePages, EXECUTABLE_POOL_WRITABLE, true); if (m_reservation) { ASSERT(m_reservation.size() == reservationSize); addFreshFreeSpace(m_reservation.base(), m_reservation.size()); startOfFixedExecutableMemoryPool = reinterpret_cast<uintptr_t>(m_reservation.base()); } }