From: Ivan Maidanski Date: Mon, 1 Aug 2016 07:20:06 +0000 (+0300) Subject: Fix various typos in comments and documentation X-Git-Tag: v7.4.6~257 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3aec436e8d6ab5f64df36cbf0a5c328f2081fd5a;p=gc Fix various typos in comments and documentation * doc/README.Mac: Fix typo (replace "it's" to "its"). * doc/debugging.html: Likewise. * doc/gcdescr.html: Fix typo ("it performs"). * include/private/gcconfig.h: Fix typo in comment ("its"). * mark.c (INITIAL_MARK_STACK_SIZE): Fix typo in comment ("it wants"). * mark.c (GC_mark_from): Fix typo in comment (double "it"). * misc.c (GC_SLOP): Fix typo in comma (double "saw"). * os_dep.c (GC_get_file_len): Fix typo in comment (missing "buffer"). * ptr_chck.c (GC_is_visible): Add missing comma in comment. --- diff --git a/doc/README.Mac b/doc/README.Mac index 55906697..f77d1c43 100644 --- a/doc/README.Mac +++ b/doc/README.Mac @@ -271,7 +271,7 @@ action! malloc will call GC_malloc and free GC_free, new/delete too. You don't have to call free or delete. You may have to be a bit cautious about delete if you're freeing other resources than RAM. See gc_cpp.h. You can also keep coding as always with delete/free. That works too. If you want, -"include and tweak it's use a bit. +"include and tweak its use a bit. == Symantec SPM == diff --git a/doc/debugging.html b/doc/debugging.html index 241875ce..01281291 100644 --- a/doc/debugging.html +++ b/doc/debugging.html @@ -285,7 +285,7 @@ collector's layout description for s is such that the pointer field will be scanned. Call *GC_find_header(s) to look at the descriptor for the heap chunk. The hb_descr field specifies the layout of objects in that chunk. See gc_mark.h for the meaning of the descriptor. -(If it's low order 2 bits are zero, then it is just the length of the +(If its low order 2 bits are zero, then it is just the length of the object prefix to be scanned. This form is always used for objects allocated with GC_malloc or GC_malloc_atomic.)
  • If the failure is not deterministic, you may still be able to apply some diff --git a/doc/gcdescr.html b/doc/gcdescr.html index 5b4b9fee..a30e776b 100644 --- a/doc/gcdescr.html +++ b/doc/gcdescr.html @@ -272,7 +272,7 @@ each call, so that it can also be used by the incremental collector. It is fairly carefully tuned, since it usually consumes a large majority of the garbage collection time.

    -The fact that it perform a only a small amount of work per call also +The fact that it performs only a small amount of work per call also allows it to be used as the core routine of the parallel marker. In that case it is normally invoked on thread-private mark stacks instead of the global mark stack. More details can be found in diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index b4fddc94..ed77466f 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -654,7 +654,7 @@ * LINUX_STACKBOTTOM * HEURISTIC1 * HEURISTIC2 - * If STACKBOTTOM is defined, then it's value will be used directly as the + * If STACKBOTTOM is defined, then its value will be used directly as the * stack base. If LINUX_STACKBOTTOM is defined, then it will be determined * with a method appropriate for most Linux systems. Currently we look * first for __libc_stack_end (currently only if USE_LIBC_PRIVATES is diff --git a/mark.c b/mark.c index f7498570..c52fc69b 100644 --- a/mark.c +++ b/mark.c @@ -93,9 +93,9 @@ GC_INNER unsigned GC_n_kinds = GC_N_KINDS_INITIAL_VALUE; /* INITIAL_MARK_STACK_SIZE * sizeof(mse) should be a */ /* multiple of HBLKSIZE. */ /* The incremental collector actually likes a larger */ - /* size, since it want to push all marked dirty objects */ - /* before marking anything new. Currently we let it */ - /* grow dynamically. */ + /* size, since it wants to push all marked dirty */ + /* objects before marking anything new. Currently we */ + /* let it grow dynamically. */ # endif STATIC word GC_n_rescuing_pages = 0; @@ -751,8 +751,8 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, /* word in object. */ ptr_t type_descr = *(ptr_t *)current_p; /* type_descr is either a valid pointer to the descriptor */ - /* structure, or this object was on a free list. If it */ - /* it was anything but the last object on the free list, */ + /* structure, or this object was on a free list. */ + /* If it was anything but the last object on the free list, */ /* we will misinterpret the next object on the free list as */ /* the type descriptor, and get a 0 GC descriptor, which */ /* is ideal. Unfortunately, we need to check for the last */ diff --git a/misc.c b/misc.c index 84cad42b..6f90f3ad 100644 --- a/misc.c +++ b/misc.c @@ -361,7 +361,7 @@ GC_API void * GC_CALL GC_clear_stack(void *arg) /* clearing near the cold end of the stack, a good thing. */ # define GC_SLOP 4000 /* We make GC_high_water this much hotter than we really saw */ - /* saw it, to cover for GC noise etc. above our current frame. */ + /* it, to cover for GC noise etc. above our current frame. */ # define CLEAR_THRESHOLD 100000 /* We restart the clearing process after this many bytes of */ /* allocation. Otherwise very heavily recursive programs */ diff --git a/os_dep.c b/os_dep.c index 00dcf004..82a794c0 100644 --- a/os_dep.c +++ b/os_dep.c @@ -129,8 +129,8 @@ STATIC ssize_t GC_repeat_read(int fd, char *buf, size_t count) #ifdef THREADS /* Determine the length of a file by incrementally reading it into a */ - /* This would be silly to use on a file supporting lseek, but Linux */ - /* /proc files usually do not. */ + /* buffer. This would be silly to use it on a file supporting lseek, */ + /* but Linux /proc files usually do not. */ STATIC size_t GC_get_file_len(int f) { size_t total = 0; diff --git a/ptr_chck.c b/ptr_chck.c index 011b27ef..e86378e9 100644 --- a/ptr_chck.c +++ b/ptr_chck.c @@ -178,7 +178,7 @@ void (GC_CALLBACK *GC_is_visible_print_proc)(void * p) = /* Check that p is visible */ /* to the collector as a possibly pointer containing location. */ -/* If it isn't invoke *GC_is_visible_print_proc. */ +/* If it isn't, invoke *GC_is_visible_print_proc. */ /* Returns the argument in all cases. May erroneously succeed */ /* in hard cases. (This is intended for debugging use with */ /* untyped allocations. The idea is that it should be possible, though */