| 1 |
/* |
| 2 |
* Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers |
| 3 |
* Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. |
| 4 |
* Copyright 1996-1999 by Silicon Graphics. All rights reserved. |
| 5 |
* Copyright 1999 by Hewlett-Packard Company. All rights reserved. |
| 6 |
* |
| 7 |
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED |
| 8 |
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK. |
| 9 |
* |
| 10 |
* Permission is hereby granted to use or copy this program |
| 11 |
* for any purpose, provided the above notices are retained on all copies. |
| 12 |
* Permission to modify the code and to distribute modified code is granted, |
| 13 |
* provided the above notices are retained, and a notice that the code was |
| 14 |
* modified is included with the above copyright notice. |
| 15 |
*/ |
| 16 |
|
| 17 |
/* This file assumes the collector has been compiled with GC_GCJ_SUPPORT. */ |
| 18 |
|
| 19 |
/* |
| 20 |
* We allocate objects whose first word contains a pointer to a struct |
| 21 |
* describing the object type. This struct contains a garbage collector mark |
| 22 |
* descriptor at offset MARK_DESCR_OFFSET. Alternatively, the objects |
| 23 |
* may be marked by the mark procedure passed to GC_init_gcj_malloc. |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifndef GC_VECTOR_H |
| 27 |
#define GC_VECTOR_H |
| 28 |
|
| 29 |
/* Gcj keeps GC descriptor as second word of vtable. This */ |
| 30 |
/* probably needs to be adjusted for other clients. */ |
| 31 |
/* We currently assume that this offset is such that: */ |
| 32 |
/* - all objects of this kind are large enough to have */ |
| 33 |
/* a value at that offset, and */ |
| 34 |
/* - it is not zero. */ |
| 35 |
/* These assumptions allow objects on the free list to be */ |
| 36 |
/* marked normally. */ |
| 37 |
|
| 38 |
#ifndef GC_H |
| 39 |
# include "gc.h" |
| 40 |
#endif |
| 41 |
|
| 42 |
# include "gc_typed.h" |
| 43 |
|
| 44 |
#ifdef __cplusplus |
| 45 |
extern "C" { |
| 46 |
#endif |
| 47 |
|
| 48 |
GC_API void GC_CALL GC_init_gcj_vector (int /* mp_index */, |
| 49 |
void * /* really mark_proc */ /* mp */); |
| 50 |
|
| 51 |
GC_API GC_ATTR_MALLOC void * GC_CALL GC_gcj_vector_malloc(size_t /* lb */, |
| 52 |
void * /* ptr_to_struct_containing_descr */); |
| 53 |
|
| 54 |
GC_API struct GC_ms_entry *GC_CALL |
| 55 |
GC_gcj_vector_mark_proc (struct GC_ms_entry *mark_stack_ptr, |
| 56 |
struct GC_ms_entry* mark_stack_limit, |
| 57 |
GC_descr element_desc, |
| 58 |
GC_word*start, |
| 59 |
GC_word*end, |
| 60 |
int words_per_element); |
| 61 |
|
| 62 |
#ifdef __cplusplus |
| 63 |
} /* extern "C" */ |
| 64 |
#endif |
| 65 |
|
| 66 |
#endif /* GC_VECTOR_H */ |