Path: blob/master/runtime/gc_glue_java/CompactDelegate.hpp
5985 views
1/*******************************************************************************2* Copyright (c) 2017, 2020 IBM Corp. and others3*4* This program and the accompanying materials are made available under5* the terms of the Eclipse Public License 2.0 which accompanies this6* distribution and is available at https://www.eclipse.org/legal/epl-2.0/7* or the Apache License, Version 2.0 which accompanies this distribution and8* is available at https://www.apache.org/licenses/LICENSE-2.0.9*10* This Source Code may also be made available under the following11* Secondary Licenses when the conditions for such availability set12* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13* General Public License, version 2 with the GNU Classpath14* Exception [1] and GNU General Public License, version 2 with the15* OpenJDK Assembly Exception [2].16*17* [1] https://www.gnu.org/software/classpath/license.html18* [2] http://openjdk.java.net/legal/assembly-exception.html19*20* 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-exception21*******************************************************************************/2223#ifndef COMPACTDELEGATE_HPP_24#define COMPACTDELEGATE_HPP_2526#include "omr.h"27#include "omrcfg.h"28#include "omrgcconsts.h"2930#include "EnvironmentStandard.hpp"3132class MM_CompactScheme;33class MM_MarkMap;3435#if defined(OMR_GC_MODRON_COMPACTION)3637/**38* Delegate class provides implementations for methods required for Collector Language Interface39*/40class MM_CompactDelegate41{42/*43* Data members44*/45private:46MM_CompactScheme *_compactScheme;47MM_MarkMap *_markMap;48OMR_VM *_omrVM;4950protected:5152public:5354/*55* Function members56*/57private:5859protected:6061public:62/**63* Initialize the delegate.64*65* @param omrVM66* @return true if delegate initialized successfully67*/68void tearDown(MM_EnvironmentBase *env);6970bool initialize(MM_EnvironmentBase *env, OMR_VM *omrVM, MM_MarkMap *markMap, MM_CompactScheme *compactScheme);7172void verifyHeap(MM_EnvironmentBase *env, MM_MarkMap *markMap);7374void fixupRoots(MM_EnvironmentBase *env, MM_CompactScheme *compactScheme);7576void workerCleanupAfterGC(MM_EnvironmentBase *env);7778void mainSetupForGC(MM_EnvironmentBase *env);7980MM_CompactDelegate()81: _compactScheme(NULL)82, _markMap(NULL)83, _omrVM(NULL)84{ }85};8687#endif /* OMR_GC_MODRON_COMPACTION */88#endif /* COMPACTDELEGATE_HPP_ */89909192