42 |
# include <sys/resource.h> |
# include <sys/resource.h> |
43 |
#endif /* BSD_TIME */ |
#endif /* BSD_TIME */ |
44 |
|
|
45 |
# ifndef GC_H |
# ifndef _GC_H |
46 |
# include "gc.h" |
# include "../gc.h" |
47 |
# endif |
# endif |
48 |
|
|
49 |
# ifndef GC_MARK_H |
# ifndef GC_MARK_H |
352 |
# include <string.h> |
# include <string.h> |
353 |
# define BCOPY_EXISTS |
# define BCOPY_EXISTS |
354 |
# endif |
# endif |
355 |
# if defined(MACOSX) |
# if defined(DARWIN) |
356 |
|
# include <string.h> |
357 |
# define BCOPY_EXISTS |
# define BCOPY_EXISTS |
358 |
# endif |
# endif |
359 |
|
|
906 |
/* OFFSET_TOO_BIG if the value j would be too */ |
/* OFFSET_TOO_BIG if the value j would be too */ |
907 |
/* large to fit in the entry. (Note that the */ |
/* large to fit in the entry. (Note that the */ |
908 |
/* size of these entries matters, both for */ |
/* size of these entries matters, both for */ |
909 |
/* space consumption and for cache utilization. */ |
/* space consumption and for cache utilization.) */ |
910 |
# define OFFSET_TOO_BIG 0xfe |
# define OFFSET_TOO_BIG 0xfe |
911 |
# define OBJ_INVALID 0xff |
# define OBJ_INVALID 0xff |
912 |
# define MAP_ENTRY(map, bytes) (map)[bytes] |
# define MAP_ENTRY(map, bytes) (map)[bytes] |
1181 |
extern long GC_large_alloc_warn_suppressed; |
extern long GC_large_alloc_warn_suppressed; |
1182 |
/* Number of warnings suppressed so far. */ |
/* Number of warnings suppressed so far. */ |
1183 |
|
|
1184 |
|
#ifdef THREADS |
1185 |
|
extern GC_bool GC_world_stopped; |
1186 |
|
#endif |
1187 |
|
|
1188 |
/* Operations */ |
/* Operations */ |
1189 |
# ifndef abs |
# ifndef abs |
1190 |
# define abs(x) ((x) < 0? (-(x)) : (x)) |
# define abs(x) ((x) < 0? (-(x)) : (x)) |
1359 |
# else |
# else |
1360 |
void GC_push_regs GC_PROTO((void)); |
void GC_push_regs GC_PROTO((void)); |
1361 |
# endif |
# endif |
1362 |
|
# if defined(SPARC) || defined(IA64) |
1363 |
|
/* Cause all stacked registers to be saved in memory. Return a */ |
1364 |
|
/* pointer to the top of the corresponding memory stack. */ |
1365 |
|
word GC_save_regs_in_stack GC_PROTO((void)); |
1366 |
|
# endif |
1367 |
/* Push register contents onto mark stack. */ |
/* Push register contents onto mark stack. */ |
1368 |
/* If NURSERY is defined, the default push */ |
/* If NURSERY is defined, the default push */ |
1369 |
/* action can be overridden with GC_push_proc */ |
/* action can be overridden with GC_push_proc */ |
1413 |
/* Set all mark bits associated with */ |
/* Set all mark bits associated with */ |
1414 |
/* a free list. */ |
/* a free list. */ |
1415 |
void GC_add_roots_inner GC_PROTO((char * b, char * e, GC_bool tmp)); |
void GC_add_roots_inner GC_PROTO((char * b, char * e, GC_bool tmp)); |
1416 |
|
void GC_remove_roots_inner GC_PROTO((char * b, char * e)); |
1417 |
GC_bool GC_is_static_root GC_PROTO((ptr_t p)); |
GC_bool GC_is_static_root GC_PROTO((ptr_t p)); |
1418 |
/* Is the address p in one of the registered static */ |
/* Is the address p in one of the registered static */ |
1419 |
/* root sections? */ |
/* root sections? */ |
1629 |
/* Make the indicated */ |
/* Make the indicated */ |
1630 |
/* free list nonempty, and return its */ |
/* free list nonempty, and return its */ |
1631 |
/* head. */ |
/* head. */ |
1632 |
|
|
1633 |
|
void GC_free_inner(GC_PTR p); |
1634 |
|
|
1635 |
void GC_init_headers GC_PROTO((void)); |
void GC_init_headers GC_PROTO((void)); |
1636 |
struct hblkhdr * GC_install_header GC_PROTO((struct hblk *h)); |
struct hblkhdr * GC_install_header GC_PROTO((struct hblk *h)); |
1859 |
# define GC_ASSERT(expr) |
# define GC_ASSERT(expr) |
1860 |
# endif |
# endif |
1861 |
|
|
1862 |
|
/* Check a compile time assertion at compile time. The error */ |
1863 |
|
/* message for failure is a bit baroque, but ... */ |
1864 |
|
# define GC_STATIC_ASSERT(expr) sizeof(char[(expr)? 1 : -1]) |
1865 |
|
|
1866 |
# if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) |
# if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC) |
1867 |
/* We need additional synchronization facilities from the thread */ |
/* We need additional synchronization facilities from the thread */ |
1868 |
/* support. We believe these are less performance critical */ |
/* support. We believe these are less performance critical */ |