aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/headers.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2000-04-19 10:10:01 +0000
committerBryce McKinlay <bryce@albatross.co.nz>2000-04-19 10:10:01 +0000
commit98deeeee9cf06f4e0f91ba1e0857dc6593e6b6be (patch)
treefec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/headers.c
parent7f6eb396b49e2fabe99b865bea7f98796bf74f33 (diff)
Imported version version 5.0alpha6.
* acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@33251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/headers.c')
-rw-r--r--boehm-gc/headers.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/boehm-gc/headers.c b/boehm-gc/headers.c
index 9564a6a53590..6e47bba8e3f0 100644
--- a/boehm-gc/headers.c
+++ b/boehm-gc/headers.c
@@ -50,10 +50,8 @@ ptr_t h;
static ptr_t scratch_free_ptr = 0;
-ptr_t GC_scratch_end_ptr = 0;
-
-ptr_t GC_scratch_last_end_ptr = 0;
- /* End point of last obtained scratch area */
+/* GC_scratch_last_end_ptr is end point of last obtained scratch area. */
+/* GC_scratch_end_ptr is end point of current scratch area. */
ptr_t GC_scratch_alloc(bytes)
register word bytes;
@@ -128,6 +126,13 @@ hdr * hhdr;
hhdr -> hb_next = (struct hblk *) hdr_free_list;
hdr_free_list = hhdr;
}
+
+hdr * GC_invalid_header;
+
+#ifdef USE_HDR_CACHE
+ word GC_hdr_cache_hits = 0;
+ word GC_hdr_cache_misses = 0;
+#endif
void GC_init_headers()
{
@@ -138,6 +143,8 @@ void GC_init_headers()
for (i = 0; i < TOP_SZ; i++) {
GC_top_index[i] = GC_all_nils;
}
+ GC_invalid_header = alloc_hdr();
+ GC_invalidate_map(GC_invalid_header);
}
/* Make sure that there is a bottom level index block for address addr */
@@ -191,10 +198,10 @@ word addr;
return(TRUE);
}
-/* Install a header for block h. */
-/* The header is uninitialized. */
-/* Returns FALSE on failure. */
-GC_bool GC_install_header(h)
+/* Install a header for block h. */
+/* The header is uninitialized. */
+/* Returns the header or 0 on failure. */
+struct hblkhdr * GC_install_header(h)
register struct hblk * h;
{
hdr * result;
@@ -205,7 +212,7 @@ register struct hblk * h;
# ifdef USE_MUNMAP
result -> hb_last_reclaimed = GC_gc_no;
# endif
- return(result != 0);
+ return(result);
}
/* Set up forwarding counts for block h of size sz */