diff options
author | ivmai <ivmai> | 2009-10-21 09:33:39 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 21:06:51 +0400 |
commit | bad4c7acb6060861cd4be55968c1f58b2026a747 (patch) | |
tree | e4772ccd33aeec9ccd4d9baadbadb48a913a13e2 /checksums.c | |
parent | c4e4721f491632c2039cece14400f353794273f4 (diff) | |
download | bdwgc-bad4c7acb6060861cd4be55968c1f58b2026a747.tar.gz |
2009-10-21 Ivan Maidanski <ivmai@mail.ru>
* allchblk.c (DEBUG): Remove macro (since unused).
* allchblk.c: Include private/gc_priv.h before other includes and
definitions.
* alloc.c: Ditto.
* gc_dlopen.c: Ditto.
* headers.c: Ditto.
* mallocx.c: Ditto.
* mark_rts.c: Ditto.
* new_hblk.c: Ditto.
* reclaim.c: Ditto.
* mark.c: Include private/gc_pmark.h before other includes.
* misc.c: Ditto.
* dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
* pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto.
* pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
already defined in gc_config_macros.h).
* dyn_load.c (GC_init_dyld): Remove parameter cast for
_dyld_register_func_for_add_image() and
_dyld_register_func_for_remove_image(); add the comment about
possible warnings; add FIXME for the deprecated
_dyld_bind_fully_image_containing_address().
* include/private/gc_priv.h: Include gc.h before the standard
headers inclusion.
* tests/test.c: Ditto.
* include/private/gcconfig.h (DebugBreak): Update the comment.
* typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
* alloc.c: Reformat the code (partly adjust indentation).
* backgraph.c: Ditto.
* blacklst.c: Ditto.
* checksums.c: Ditto.
* finalize.c: Ditto.
* gcj_mlc.c: Ditto.
* mach_dep.c: Ditto.
* mark_rts.c: Ditto.
* obj_map.c: Ditto.
* os_dep.c: Ditto.
* ptr_chck.c: Ditto.
* stubborn.c: Ditto.
* thread_local_alloc.c: Ditto.
* typd_mlc.c: Ditto.
Diffstat (limited to 'checksums.c')
-rw-r--r-- | checksums.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/checksums.c b/checksums.c index 44f7c7e1..b8135af7 100644 --- a/checksums.c +++ b/checksums.c @@ -10,7 +10,6 @@ * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. */ -/* Boehm, March 29, 1995 12:51 pm PST */ #include "private/gc_priv.h" @@ -21,9 +20,9 @@ /* We assume that stubborn objects are changed only when they are */ /* enabled for writing. (Certain kinds of writing are actually */ /* safe under other conditions.) */ -# define NSUMS 10000 +#define NSUMS 10000 -# define OFFSET 0x10000 +#define OFFSET 0x10000 typedef struct { GC_bool new_valid; @@ -75,11 +74,11 @@ STATIC word GC_checksum(struct hblk *h) return(result | 0x80000000 /* doesn't look like pointer */); } -# ifdef STUBBORN_ALLOC -/* Check whether a stubborn object from the given block appears on */ -/* the appropriate free list. */ -STATIC GC_bool GC_on_free_list(struct hblk *h) -{ +#ifdef STUBBORN_ALLOC + /* Check whether a stubborn object from the given block appears on */ + /* the appropriate free list. */ + STATIC GC_bool GC_on_free_list(struct hblk *h) + { hdr * hhdr = HDR(h); size_t sz = BYTES_TO_WORDS(hhdr -> hb_sz); ptr_t p; @@ -89,8 +88,8 @@ STATIC GC_bool GC_on_free_list(struct hblk *h) if (HBLKPTR(p) == h) return(TRUE); } return(FALSE); -} -# endif + } +#endif int GC_n_dirty_errors = 0; int GC_n_faulted_dirty_errors = 0; @@ -212,7 +211,7 @@ out: (unsigned long)GC_n_changed_errors); GC_printf("These may be benign (provoked by nonpointer changes)\n"); # ifdef THREADS - GC_printf( + GC_printf( "Also expect 1 per thread currently allocating a stubborn obj.\n"); # endif } |