From 2c796d1669a58693f035fa42861b76fdd47dc453 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 11 Jan 2017 11:26:11 +0300 Subject: [PATCH] Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation * doc/debugging.html: Rename backptr.h to gc_backptr.h. * include/gc_mark.h (GC_DS_PER_OBJECT): Rename DS_TAGS to GC_DS_TAGS in the comment. * include/private/gc_priv.h (hblkhdr.hb_descr): Rename mark.h to gc_mark.h in the comment. --- doc/debugging.html | 2 +- include/gc_mark.h | 4 ++-- include/private/gc_priv.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/debugging.html b/doc/debugging.html index 0128129..5c24862 100644 --- a/doc/debugging.html +++ b/doc/debugging.html @@ -160,7 +160,7 @@ before including gc.h and allocating with GC_MALLOC), so that objects will be identified by their allocation site,
  • Running the application long enough so that most of the heap is composed of "leaked" memory, and -
  • Then calling GC_generate_random_backtrace() from backptr.h +
  • Then calling GC_generate_random_backtrace() from gc_backptr.h a few times to determine why some randomly sampled objects in the heap are being retained. diff --git a/include/gc_mark.h b/include/gc_mark.h index 7324abd..c30da2c 100644 --- a/include/gc_mark.h +++ b/include/gc_mark.h @@ -101,10 +101,10 @@ typedef struct GC_ms_entry * (*GC_mark_proc)(GC_word * /* addr */, | (proc_index)) << GC_DS_TAG_BITS) | GC_DS_PROC) #define GC_DS_PER_OBJECT 3 /* The real descriptor is at the */ /* byte displacement from the beginning of the */ - /* object given by descr & ~DS_TAGS */ + /* object given by descr & ~GC_DS_TAGS. */ /* If the descriptor is negative, the real */ /* descriptor is at (*) - */ - /* (descr & ~DS_TAGS) - GC_INDIR_PER_OBJ_BIAS */ + /* (descr&~GC_DS_TAGS) - GC_INDIR_PER_OBJ_BIAS */ /* The latter alternative can be used if each */ /* object contains a type descriptor in the */ /* first word. */ diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 71c8a20..417092d 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -1001,7 +1001,7 @@ struct hblkhdr { /* without generating a negative result. We avoid */ /* generating free blocks larger than that. */ word hb_descr; /* object descriptor for marking. See */ - /* mark.h. */ + /* gc_mark.h. */ # ifdef MARK_BIT_PER_GRANULE unsigned short * hb_map; /* Essentially a table of remainders */ /* mod BYTES_TO_GRANULES(hb_sz), except */ -- 2.7.4