The logic of these structures and functions is empty, pending a garbage collection design for the project.
This common header file gc.h defines the prototypes for all garbage collection implementations by way of the CONFIG_GC_TYPE_xxx symbol definition.
Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file gc.h.
#include "arch.h"
Go to the source code of this file.
Stub garbage collection model definitions | |
Expand the GC_xxx() macros into the simple heap model as implemented by gc_stub.c.
Each garbage collection algorithm will have a section just like this here in this file so that these macros will expand to point to the API as implemented by that algoritm. For some examples as to how this is done for other modules, please refer to heap.h . | |
#define | GC_CLASS_DELETE gc_class_delete_stub |
#define | GC_CLASS_FIELD_MKREF gc_class_field_mkref_stub |
#define | GC_CLASS_FIELD_RMREF gc_class_field_rmref_stub |
#define | GC_CLASS_MKREF_FROM_CLASS gc_class_mkref_from_class_stub |
#define | GC_CLASS_MKREF_FROM_OBJECT gc_class_mkref_from_object_stub |
#define | GC_CLASS_NEW gc_class_new_stub |
#define | GC_CLASS_RELOAD gc_class_reload_stub |
#define | GC_CLASS_RMREF_FROM_CLASS gc_class_rmref_from_class_stub |
#define | GC_CLASS_RMREF_FROM_OBJECT gc_class_rmref_from_object_stub |
#define | GC_INIT gc_init_stub |
#define | GC_OBJECT_DELETE gc_object_delete_stub |
#define | GC_OBJECT_FIELD_MKREF gc_object_field_mkref_stub |
#define | GC_OBJECT_FIELD_RMREF gc_object_field_rmref_stub |
#define | GC_OBJECT_MKREF_FROM_CLASS gc_object_mkref_from_class_stub |
#define | GC_OBJECT_MKREF_FROM_OBJECT gc_object_mkref_from_object_stub |
#define | GC_OBJECT_NEW gc_object_new_stub |
#define | GC_OBJECT_RMREF_FROM_CLASS gc_object_rmref_from_class_stub |
#define | GC_OBJECT_RMREF_FROM_OBJECT gc_object_rmref_from_object_stub |
#define | GC_RUN gc_run_stub |
#define | GC_STACK_DELETE gc_stack_delete_stub |
#define | GC_STACK_MKREF_FROM_JVM gc_stack_mkref_from_jvm_stub |
#define | GC_STACK_NEW gc_stack_new_stub |
#define | GC_STACK_RMREF_FROM_JVM gc_stack_rmref_from_jvm_stub |
Functions | |
rboolean | gc_class_delete_stub (jvm_class_index clsidxOLD, rboolean delete_class) |
Garbage collect a class static instance. | |
rboolean | gc_class_field_mkref_stub (jvm_class_index clsidxTO, jvm_field_lookup_index csflidxTO) |
Add a class static field reference to a class. | |
rboolean | gc_class_field_rmref_stub (jvm_class_index clsidxTO, jvm_field_lookup_index csflidxTO) |
Remove a class static field reference from a class. | |
rboolean | gc_class_mkref_from_class_stub (jvm_class_index clsidxFROM, jvm_class_index clsidxTO) |
Add a class static reference to a class. | |
rboolean | gc_class_mkref_from_object_stub (jvm_object_hash objhashFROM, jvm_class_index clsidxTO) |
Add an object instance reference to a class. | |
rboolean | gc_class_new_stub (jvm_class_index clsidxNEW) |
Start up garbage collection for a class. | |
rboolean | gc_class_reload_stub (jvm_class_index clsidxOLD, jvm_class_index clsidxNEW) |
Shut down and restart garbage collection for a class. | |
rboolean | gc_class_rmref_from_class_stub (jvm_class_index clsidxFROM, jvm_class_index clsidxTO) |
Remove a class static reference from a class. | |
rboolean | gc_class_rmref_from_object_stub (jvm_object_hash objhashFROM, jvm_class_index clsidxTO) |
Remove an object instance reference from a class. | |
static void | gc_h_dummy (void) |
rvoid | gc_init_stub (rvoid) |
rboolean | gc_object_delete_stub (jvm_object_hash objhashOLD) |
Garbage collect an object instance. | |
rboolean | gc_object_field_mkref_stub (jvm_object_hash objhashTO, jvm_field_lookup_index oiflidxTO) |
Add an object instance field reference to an object. | |
rboolean | gc_object_field_rmref_stub (jvm_object_hash objhashTO, jvm_field_lookup_index oiflidxTO) |
Add an object instance field reference to an object. | |
rboolean | gc_object_mkref_from_class_stub (jvm_class_index clsidxFROM, jvm_object_hash objhashTO) |
Add a class static reference to an object. | |
rboolean | gc_object_mkref_from_object_stub (jvm_object_hash objhashFROM, jvm_object_hash objhashTO) |
Add an object instance reference to an object. | |
rboolean | gc_object_new_stub (jvm_object_hash objhashNEW) |
Start up garbage collection for an object. | |
rboolean | gc_object_rmref_from_class_stub (jvm_class_index clsidxFROM, jvm_object_hash objhashTO) |
Remove a class static reference from an object. | |
rboolean | gc_object_rmref_from_object_stub (jvm_object_hash objhashFROM, jvm_object_hash objhashTO) |
Remove an object instance reference from an object. | |
rvoid | gc_run_stub (rboolean rmref) |
Review collection status of all objects and clean them up. | |
rboolean | gc_stack_delete_stub (jvm_thread_index thridxOLD, rvoid **ppgcm, jint *plocal_teardown) |
Garbage collect a Java virtual method stack frame. | |
rboolean | gc_stack_mkref_from_jvm_stub (jvm_thread_index thridxFROM, jint frmidxTO) |
Add local variable reference to an object. | |
rvoid * | gc_stack_new_stub (jvm_thread_index thridxNEW, rint num_locals) |
Start up garbage collection for a new Java virtual method stack frame. | |
rboolean | gc_stack_rmref_from_jvm_stub (jvm_thread_index thridxFROM, jint frmidxTO) |
Remove local variable reference from an object. | |
Variables | |
static char * | gc_h_copyright = "\0" "$URL: https://svn.apache.org/path/name/gc.h $ $Id: gc.h 0 09/28/2005 dlydick $" " " "Copyright 2005 The Apache Software Foundation or its licensors, as applicable." |
|
|
|
Definition at line 71 of file gc.h. Referenced by class_allocate_slot(), heap_get_common_simple_bimodal(), and object_allocate_slot(). |
|
|
|
|
|
Definition at line 76 of file gc.h. Referenced by linkage_resolve_class(), and opcode_load_run_throwable(). |
|
|
|
Definition at line 78 of file gc.h. Referenced by class_get_object_instance_field_data(), and opcode_load_run_throwable(). |
|
|
|
|
|
Definition at line 81 of file gc.h. Referenced by class_static_delete(). |
|
|
|
|
|
|
|
Definition at line 86 of file gc.h. Referenced by opcode_load_run_throwable(). |
|
Definition at line 87 of file gc.h. Referenced by class_get_object_instance_field_data(). |
|
Definition at line 88 of file gc.h. Referenced by object_instance_delete(), and opcode_load_run_throwable(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Review collection status of all objects and clean them up. Scan through object table for objects that need be deallocated and free up those resources for reuse by the JVM.
< NULL class slot. Exactly on exists in normal use, any else besides the JVMCFG_NULL_CLASS is a class slot now being initialized. < Class may be garbage collected.
< NULL object (only 1 exists in normal use, any else besides the JVMCFG_NULL_OBJECT is an object slot now being initialized.) < Object may be garbage collected
Definition at line 153 of file gc_stub.c. References CLASS, CLASS_STATUS_GCREQ, CLASS_STATUS_INUSE, CLASS_STATUS_NULL, jvm_class_index_null, jvm_object_hash_null, JVMCFG_MAX_CLASSES, JVMCFG_MAX_OBJECTS, OBJECT, OBJECT_STATUS_GCREQ, OBJECT_STATUS_INUSE, and OBJECT_STATUS_NULL. |
|
Start up garbage collection for a class. Initialize garbage collection for a new class static instance, as set up in class_static_new(). The reverse of gc_class_delete_stub().
Definition at line 256 of file gc_stub.c. References rfalse. |
|
Shut down and restart garbage collection for a class. Reinitialize garbage collection for a reloaded class static instance, as set up in class_reload().
Definition at line 286 of file gc_stub.c. References rfalse. |
|
Add a class static reference to a class. Mark class as having another class static instance reference to it, namely a lower_dim_array or initiating_ClassLoader or defining_ClasslLoader The reverse of gc_class_rmref_from_class_stub().
Definition at line 320 of file gc_stub.c. References rfalse. |
|
Add an object instance reference to a class. Mark class as having another class object instance reference to it, namely where OBJECT_STATUS_CLASS is set for that object. (Usually marked only one time over the life of the class.) The reverse of gc_class_rmref_from_object_stub().
Definition at line 351 of file gc_stub.c. References rfalse. |
|
Remove a class static reference from a class. Unmark class as having a class static instance reference to it. The reverse of gc_class_mkref_from_class_stub().
Definition at line 383 of file gc_stub.c. References rfalse. |
|
Remove an object instance reference from a class. Unmark class as having a class object reference to it, namely where OBJECT_STATUS_CLASS is set for that object. (Usually marked only one time over the life of the class, so this will effectively mark the class itself as being ready for garbage collection.) The reverse of gc_class_mkref_stub().
Definition at line 415 of file gc_stub.c. References rfalse. |
|
Add a class static field reference to a class. Mark class static field as being a reference type (typically after loading the class). The reverse of gc_class_field_rmref_stub().
Definition at line 446 of file gc_stub.c. References rfalse. |
|
Remove a class static field reference from a class. Mark class static field as not being a reference type (typically before unloading the class. The reverse of gc_class_field_mkref_stub().
Definition at line 477 of file gc_stub.c. References rfalse. |
|
Garbage collect a class static instance. Finalize garbage collection for a class static instance that will no longer be used, as set up in class_static_delete(). If there are any outstanding references to this class, those must first be removed, at which time gc_run_stub() will perform the finalization instead. The reverse of gc_class_new_stub().
Definition at line 517 of file gc_stub.c. References rfalse. |
|
Start up garbage collection for an object. Initialize garbage collection for a new object instance, as set up in object_new(). The reverse of gc_object_delete_stub().
Definition at line 545 of file gc_stub.c. References rfalse. |
|
Add a class static reference to an object. Mark object as having another class static instance reference to it. The reverse of gc_object_rmref_from_class_stub().
Definition at line 573 of file gc_stub.c. References rfalse. |
|
Add an object instance reference to an object. Mark object as having another object instance reference to it. The reverse of gc_object_rmref_from_object_stub().
Definition at line 605 of file gc_stub.c. References rfalse. |
|
Remove a class static reference from an object. Unmark object as having a class static instance reference to it. The reverse of gc_object_mkref_from_class_stub().
Definition at line 634 of file gc_stub.c. References rfalse. |
|
Remove an object instance reference from an object. Unmark object as having an object instance reference to it. The reverse of gc_object_mkref_from_object_stub().
Definition at line 666 of file gc_stub.c. References rfalse. |
|
Add an object instance field reference to an object. Mark object instance field as being a reference type (typically after loading the class and instantiating an object of that class type). The reverse of gc_object_field_rmref_stub().
Definition at line 697 of file gc_stub.c. References rfalse. |
|
Add an object instance field reference to an object. Mark object instance field as not being a reference type any more (typically before unloading the class). The reverse of gc_object_field_rmref_stub().
Definition at line 728 of file gc_stub.c. References rfalse. |
|
Garbage collect an object instance. Finalize garbage collection for an object instance that will no longer be used, as set up in object_instance_delete(). If there are any outstanding references to this class, those must first be removed, at which time gc_run_stub() will perform the finalization instead. The reverse of gc_object_new_stub().
Definition at line 763 of file gc_stub.c. References rnull. |
|
Start up garbage collection for a new Java virtual method stack frame. Initialize garbage collection for a new stack frame for a virtual Java method invocation, as set up in PUSH_GC(). The reverse of gc_stack_delete_stub().
Definition at line 796 of file gc_stub.c. References rfalse. |
|
Add local variable reference to an object. Mark object as having another local variable instance reference to it. The reverse of gc_stack_rmref_stub().
Definition at line 826 of file gc_stub.c. References rfalse. |
|
Remove local variable reference from an object. Unmark object from having another local variable instance reference to it. The reverse of gc_stack_mkref_stub().
Definition at line 857 of file gc_stub.c. References rfalse. |
|
Garbage collect a Java virtual method stack frame. Finalize garbage collection for a stack frame that will no longer be used by a virtual Java method, as set up in PUSH_GC(). This function is called from POP_GC(). It is the reverse of gc_stack_new_stub().
|
|
|