aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/include/private/gc_priv.h
diff options
context:
space:
mode:
authorBryce McKinlay <mckinlay@redhat.com>2004-08-13 23:05:36 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2004-08-14 00:05:36 +0100
commit4109fe8594fef15d5cb36d1019e5b7c95dbc45f6 (patch)
tree863181355c9339e1361dad10263a322aaabe426e /boehm-gc/include/private/gc_priv.h
parentf13bb1997aa840029740a52684fb9bcd20e834ab (diff)
downloadgcc-4109fe8594fef15d5cb36d1019e5b7c95dbc45f6.zip
gcc-4109fe8594fef15d5cb36d1019e5b7c95dbc45f6.tar.gz
gcc-4109fe8594fef15d5cb36d1019e5b7c95dbc45f6.tar.bz2
configure.in (GCINCS): Don't use "boehm-cflags".
libjava: 2004-08-13 Bryce McKinlay <mckinlay@redhat.com> * configure.in (GCINCS): Don't use "boehm-cflags". Instead, -I boehm-gc's include dirs. * configure: Rebuilt. * include/boehm-gc.h: Include gc_config.h. boehm-gc: 2004-08-13 Bryce McKinlay <mckinlay@redhat.com> * configure.ac (gc_cflags): Add -Iinclude. (AC_CONFIG_HEADERS): New. Configure gc_config.h header. Don't write DEFS to boehm-cflags file. * configure: Rebuilt. * gcj_mlc.c: Check #ifdef GC_GCJ_SUPPORT after including headers. * specific.c: Check #ifdef GC_LINUX_THREADS after including headers. * include/gc_config_macros.h: Remove backward-compatibility redefinitions of GC_ names. * include/gc.h: Include <gc_config.h>. 2004-08-13 Bryce McKinlay <mckinlay@redhat.com> Import Boehm GC version 6.3. From-SVN: r85972
Diffstat (limited to 'boehm-gc/include/private/gc_priv.h')
-rw-r--r--boehm-gc/include/private/gc_priv.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/boehm-gc/include/private/gc_priv.h b/boehm-gc/include/private/gc_priv.h
index 5e7625f..08dd8ea 100644
--- a/boehm-gc/include/private/gc_priv.h
+++ b/boehm-gc/include/private/gc_priv.h
@@ -550,7 +550,7 @@ extern GC_warn_proc GC_current_warn_proc;
#define CPP_MAXOBJBYTES (CPP_HBLKSIZE/2)
#define MAXOBJBYTES ((word)CPP_MAXOBJBYTES)
-#define CPP_MAXOBJSZ BYTES_TO_WORDS(CPP_HBLKSIZE/2)
+#define CPP_MAXOBJSZ BYTES_TO_WORDS(CPP_MAXOBJBYTES)
#define MAXOBJSZ ((word)CPP_MAXOBJSZ)
# define divHBLKSZ(n) ((n) >> LOG_HBLKSIZE)
@@ -578,7 +578,7 @@ extern GC_warn_proc GC_current_warn_proc;
# else
# define ALIGNED_WORDS(n) ROUNDED_UP_WORDS(n)
# endif
-# define SMALL_OBJ(bytes) ((bytes) < (MAXOBJBYTES - EXTRA_BYTES))
+# define SMALL_OBJ(bytes) ((bytes) <= (MAXOBJBYTES - EXTRA_BYTES))
# define ADD_SLOP(bytes) ((bytes) + EXTRA_BYTES)
# ifndef MIN_WORDS
/* MIN_WORDS is the size of the smallest allocated object. */
@@ -615,6 +615,10 @@ extern GC_warn_proc GC_current_warn_proc;
# define LOG_PHT_ENTRIES 16 /* Collisions are likely if heap grows */
/* to more than 64K hblks >= 256MB. */
/* Each hash table occupies 8K bytes. */
+ /* Even for somewhat smaller heaps, */
+ /* say half that, collisions may be an */
+ /* issue because we blacklist */
+ /* addresses outside the heap. */
# endif
# endif
# define PHT_ENTRIES ((word)1 << LOG_PHT_ENTRIES)
@@ -934,11 +938,11 @@ struct _GC_arrays {
char _valid_offsets[VALID_OFFSET_SZ];
/* GC_valid_offsets[i] == TRUE ==> i */
/* is registered as a displacement. */
-# define OFFSET_VALID(displ) \
- (GC_all_interior_pointers || GC_valid_offsets[displ])
char _modws_valid_offsets[sizeof(word)];
/* GC_valid_offsets[i] ==> */
/* GC_modws_valid_offsets[i%sizeof(word)] */
+# define OFFSET_VALID(displ) \
+ (GC_all_interior_pointers || GC_valid_offsets[displ])
# ifdef STUBBORN_ALLOC
page_hash_table _changed_pages;
/* Stubborn object pages that were changes since last call to */
@@ -966,7 +970,7 @@ struct _GC_arrays {
# endif
# else
# ifdef SMALL_CONFIG
-# define MAX_HEAP_SECTS 128 /* Roughly 1GB */
+# define MAX_HEAP_SECTS 128 /* Roughly 256MB (128*2048*1K) */
# else
# define MAX_HEAP_SECTS 384 /* Roughly 3GB */
# endif
@@ -1436,6 +1440,7 @@ GC_bool GC_is_tmp_root GC_PROTO((ptr_t p));
# endif
void GC_register_dynamic_libraries GC_PROTO((void));
/* Add dynamic library data sections to the root set. */
+
GC_bool GC_register_main_static_data GC_PROTO((void));
/* We need to register the main data segment. Returns */
/* TRUE unless this is done implicitly as part of */
@@ -1610,7 +1615,7 @@ void GC_collect_a_little_inner GC_PROTO((int n));
/* collection work, if appropriate. */
/* A unit is an amount appropriate for */
/* HBLKSIZE bytes of allocation. */
-ptr_t GC_generic_malloc GC_PROTO((word lb, int k));
+/* ptr_t GC_generic_malloc GC_PROTO((word lb, int k)); */
/* Allocate an object of the given */
/* kind. By default, there are only */
/* a few kinds: composite(pointerfree), */
@@ -1620,6 +1625,7 @@ ptr_t GC_generic_malloc GC_PROTO((word lb, int k));
/* internals to add more, e.g. to */
/* communicate object layout info */
/* to the collector. */
+ /* The actual decl is in gc_mark.h. */
ptr_t GC_generic_malloc_ignore_off_page GC_PROTO((size_t b, int k));
/* As above, but pointers past the */
/* first page of the resulting object */
@@ -1717,6 +1723,10 @@ extern GC_bool GC_print_stats; /* Produce at least some logging output */
# define COND_DUMP
#endif
+#ifdef KEEP_BACK_PTRS
+ extern long GC_backtraces;
+#endif
+
/* Macros used for collector internal allocation. */
/* These assume the collector lock is held. */
#ifdef DBG_HDRS_ALL