Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

gc.h

Go to the documentation of this file.
00001 #ifndef _gc_h_included_
00002 #define _gc_h_included_
00003 
00004 /*!
00005  * @file gc.h
00006  *
00007  * @brief Garbage collection structures and API
00008  *
00009  * The logic of these structures and functions is empty, pending
00010  * a garbage collection design for the project.
00011  *
00012  * This common header file @link jvm/src/gc.h gc.h@endlink defines
00013  * the prototypes for all garbage collection implementations by way
00014  * of the @link #CONFIG_GC_TYPE_STUB CONFIG_GC_TYPE_xxx@endlink
00015  * symbol definition.
00016  *
00017  *
00018  * @section Control
00019  *
00020  * \$URL: https://svn.apache.org/path/name/gc.h $ \$Id: gc.h 0 09/28/2005 dlydick $
00021  *
00022  * Copyright 2005 The Apache Software Foundation
00023  * or its licensors, as applicable.
00024  *
00025  * Licensed under the Apache License, Version 2.0 ("the License");
00026  * you may not use this file except in compliance with the License.
00027  * You may obtain a copy of the License at
00028  *
00029  *     http://www.apache.org/licenses/LICENSE-2.0
00030  *
00031  * Unless required by applicable law or agreed to in writing,
00032  * software distributed under the License is distributed on an
00033  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00034  * either express or implied.
00035  *
00036  * See the License for the specific language governing permissions
00037  * and limitations under the License.
00038  *
00039  * @version \$LastChangedRevision: 0 $
00040  *
00041  * @date \$LastChangedDate: 09/28/2005 $
00042  *
00043  * @author \$LastChangedBy: dlydick $
00044  *         Original code contributed by Daniel Lydick on 09/28/2005.
00045  *
00046  * @section Reference
00047  *
00048  */
00049 
00050 #include "arch.h"
00051 ARCH_COPYRIGHT_APACHE(gc, h, "$URL: https://svn.apache.org/path/name/gc.h $ $Id: gc.h 0 09/28/2005 dlydick $");
00052 
00053 #ifdef CONFIG_GC_TYPE_STUB
00054 /*!
00055  * @name Stub garbage collection model definitions
00056  *
00057  * @brief Expand the @b GC_xxx() macros into the simple heap model as
00058  * implemented by @link jvm/src/gc_stub.c gc_stub.c@endlink.
00059  *
00060  * Each garbage collection algorithm will have a section just
00061  * like this here in this file so that these macros will expand
00062  * to point to the API as implemented by that algoritm.  For
00063  * some examples as to how this is done for other modules,
00064  * please refer to @link jvm/src/heap.h heap.h@endlink .
00065  *
00066  */
00067 
00068 /*@{ */ /* Begin grouped definitions */
00069 
00070 #define GC_INIT gc_init_stub
00071 #define GC_RUN  gc_run_stub
00072 
00073 #define GC_CLASS_NEW                gc_class_new_stub
00074 #define GC_CLASS_RELOAD             gc_class_reload_stub
00075 
00076 #define GC_CLASS_MKREF_FROM_CLASS   gc_class_mkref_from_class_stub
00077 #define GC_CLASS_MKREF_FROM_OBJECT  gc_class_mkref_from_object_stub
00078 #define GC_CLASS_RMREF_FROM_CLASS   gc_class_rmref_from_class_stub
00079 #define GC_CLASS_RMREF_FROM_OBJECT  gc_class_rmref_from_object_stub
00080 #define GC_CLASS_FIELD_MKREF        gc_class_field_mkref_stub
00081 #define GC_CLASS_FIELD_RMREF        gc_class_field_rmref_stub
00082 #define GC_CLASS_DELETE             gc_class_delete_stub
00083 
00084 #define GC_OBJECT_NEW               gc_object_new_stub
00085 #define GC_OBJECT_MKREF_FROM_CLASS  gc_object_mkref_from_class_stub
00086 #define GC_OBJECT_MKREF_FROM_OBJECT gc_object_mkref_from_object_stub
00087 #define GC_OBJECT_RMREF_FROM_CLASS  gc_object_rmref_from_class_stub
00088 #define GC_OBJECT_RMREF_FROM_OBJECT gc_object_rmref_from_object_stub
00089 #define GC_OBJECT_FIELD_MKREF       gc_object_field_mkref_stub
00090 #define GC_OBJECT_FIELD_RMREF       gc_object_field_rmref_stub
00091 #define GC_OBJECT_DELETE            gc_object_delete_stub
00092 
00093 #define GC_STACK_NEW                gc_stack_new_stub
00094 #define GC_STACK_MKREF_FROM_JVM     gc_stack_mkref_from_jvm_stub
00095 #define GC_STACK_RMREF_FROM_JVM     gc_stack_rmref_from_jvm_stub
00096 #define GC_STACK_DELETE             gc_stack_delete_stub
00097 
00098 /*@} */ /* End of grouped definitions */
00099 #endif
00100 
00101 
00102 /* Prototypes for functions in 'gc_XXX.c' */
00103 
00104 extern rvoid GC_INIT(rvoid);
00105 extern rvoid GC_RUN(rboolean rmref);
00106 
00107 extern rboolean  GC_CLASS_NEW(jvm_class_index clsidxNEW);
00108 extern rboolean  GC_CLASS_RELOAD(jvm_class_index clsidxOLD,
00109                                  jvm_class_index clsidxNEW);
00110 
00111 extern rboolean  GC_CLASS_MKREF_FROM_CLASS(jvm_class_index clsidxFROM,
00112                                            jvm_class_index clsidxTO);
00113 extern rboolean  GC_CLASS_MKREF_FROM_OBJECT(jvm_object_hash objhashFROM,
00114                                             jvm_class_index clsidxTO);
00115 extern rboolean  GC_CLASS_RMREF_FROM_CLASS(jvm_class_index clsidxFROM,
00116                                            jvm_class_index clsidxTO);
00117 extern rboolean  GC_CLASS_RMREF_FROM_OBJECT(jvm_object_hash objhashFROM,
00118                                             jvm_class_index clsidxTO);
00119 extern rboolean  GC_CLASS_FIELD_MKREF(jvm_class_index        clsidxTO,
00120                                       jvm_field_lookup_index csflidxTO);
00121 extern rboolean  GC_CLASS_FIELD_RMREF(jvm_class_index        clsidxTO,
00122                                       jvm_field_lookup_index csflidxTO);
00123 extern rboolean  GC_CLASS_DELETE(jvm_class_index clsidxOLD,
00124                                  rboolean        delete_class);
00125 
00126 extern rboolean  GC_OBJECT_NEW(jvm_object_hash objhashNEW);
00127 extern rboolean  GC_OBJECT_MKREF_FROM_CLASS(jvm_class_index clsidxFROM,
00128                                             jvm_object_hash objhashTO);
00129 extern rboolean GC_OBJECT_MKREF_FROM_OBJECT(jvm_object_hash objhashFROM,
00130                                              jvm_object_hash objhashTO);
00131 extern rboolean  GC_OBJECT_RMREF_FROM_CLASS(jvm_class_index clsidxFROM,
00132                                             jvm_object_hash objhashTO);
00133 extern rboolean GC_OBJECT_RMREF_FROM_OBJECT(jvm_object_hash objhashFROM,
00134                                              jvm_object_hash objhashTO);
00135 extern rboolean  GC_OBJECT_FIELD_MKREF(jvm_object_hash        objhashTO,
00136                                       jvm_field_lookup_index oiflidxTO);
00137 extern rboolean  GC_OBJECT_FIELD_RMREF(jvm_object_hash        objhashTO,
00138                                       jvm_field_lookup_index oiflidxTO);
00139 extern rboolean  GC_OBJECT_DELETE(jvm_object_hash objhashOLD);
00140 
00141 extern rvoid    *GC_STACK_NEW(jvm_thread_index thridxNEW,
00142                               rint num_locals);
00143 extern rboolean  GC_STACK_MKREF_FROM_JVM(jvm_thread_index thridxFROM,
00144                                          jint frmidxTO);
00145 extern rboolean  GC_STACK_RMREF_FROM_JVM(jvm_thread_index thridxFROM,
00146                                          jint frmidxTO);
00147 extern rboolean  GC_STACK_DELETE(jvm_thread_index   thridxOLD,
00148                                  rvoid            **ppgcm,
00149                                  jint              *plocal_teardown);
00150 
00151 #endif /* _gc_h_included_ */
00152 
00153 /* EOF */
00154 

Generated on Fri Sep 30 18:59:28 2005 by  doxygen 1.4.4