Path: blob/master/runtime/gc_realtime/ConfigurationRealtime.hpp
5986 views
/*******************************************************************************1* Copyright (c) 1991, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122/**23* @file24* @ingroup GC_Modron_Metronome25*/2627#if !defined(CONFIGURATIONREALTIME_HPP_)28#define CONFIGURATIONREALTIME_HPP_2930#include "omr.h"31#include "omrcfg.h"3233#include "Configuration.hpp"34#include "EnvironmentRealtime.hpp"3536class MM_GlobalCollector;37class MM_Heap;38class MM_GlobalAllocationManagerSegregated;3940class MM_ConfigurationRealtime : public MM_Configuration41{42/* Data members / Types */43public:4445protected:46static const uintptr_t REALTIME_REGION_SIZE_BYTES = (64 * 1024);47static const uintptr_t REALTIME_ARRAYLET_LEAF_SIZE_BYTES = OMR_SIZECLASSES_MAX_SMALL_SIZE_BYTES;4849private:5051/* Methods */52public:53virtual MM_GlobalCollector *createGlobalCollector(MM_EnvironmentBase *env);54virtual MM_Heap *createHeapWithManager(MM_EnvironmentBase *env, uintptr_t heapBytesRequested, MM_HeapRegionManager *regionManager);55virtual MM_HeapRegionManager *createHeapRegionManager(MM_EnvironmentBase *env);56virtual MM_MemorySpace *createDefaultMemorySpace(MM_EnvironmentBase *env, MM_Heap *heap, MM_InitializationParameters *parameters);57virtual J9Pool *createEnvironmentPool(MM_EnvironmentBase *env);58virtual MM_ParallelDispatcher *createParallelDispatcher(MM_EnvironmentBase *env, omrsig_handler_fn handler, void* handler_arg, uintptr_t defaultOSStackSize);5960virtual void defaultMemorySpaceAllocated(MM_GCExtensionsBase *extensions, void* defaultMemorySpace);6162MM_ConfigurationRealtime(MM_EnvironmentBase *env)63: MM_Configuration(env, gc_policy_metronome, mm_regionAlignment, REALTIME_REGION_SIZE_BYTES, REALTIME_ARRAYLET_LEAF_SIZE_BYTES, gc_modron_wrtbar_satb, gc_modron_allocation_type_segregated)64{65_typeId = __FUNCTION__;66};6768static MM_Configuration *newInstance(MM_EnvironmentBase *env);6970protected:71virtual bool initialize(MM_EnvironmentBase *env);72virtual void tearDown(MM_EnvironmentBase *env);73virtual MM_EnvironmentBase *allocateNewEnvironment(MM_GCExtensionsBase *extensions, OMR_VMThread *omrVMThread);74virtual bool initializeEnvironment(MM_EnvironmentBase *env);7576private:77};787980#endif /* CONFIGURATIONREALTIME_HPP_ */818283