From: Yury Khrustalev Date: Wed, 4 Mar 2026 09:04:14 +0000 (+0000) Subject: misc: Fix a few typos in comments X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41918174fc7b839cd14717fcee36833eb3acc73c;p=thirdparty%2Fglibc.git misc: Fix a few typos in comments --- diff --git a/malloc/arena.c b/malloc/arena.c index cabeb0d8ce..d2ed627922 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -423,7 +423,7 @@ alloc_new_heap (size_t size, size_t top_pad, size_t pagesize, return NULL; } - /* Only considere the actual usable range. */ + /* Only consider the actual usable range. */ __set_vma_name (p2, size, " glibc: malloc arena"); madvise_thp (p2, size); diff --git a/malloc/malloc.c b/malloc/malloc.c index 710887f4da..f7b925c49a 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -545,7 +545,7 @@ tag_at (void *ptr) there's no compelling reason to bother to do this.) The main declaration needed is the mallinfo struct that is returned - (by-copy) by mallinfo(). The SVID/XPG malloinfo struct contains a + (by-copy) by mallinfo(). The SVID/XPG mallinfo struct contains a bunch of fields that are not even meaningful in this version of malloc. These fields are are instead filled by mallinfo() with other numbers that might be of interest. @@ -809,7 +809,7 @@ libc_hidden_proto (__libc_mallopt) might set to a value close to the average size of a process (program) running on your system. Releasing this much memory would allow such a process to run in memory. Generally, it's - worth it to tune for trimming rather tham memory mapping when a + worth it to tune for trimming rather than memory mapping when a program undergoes phases where several large chunks are allocated and released in ways that can reuse each other's storage, perhaps mixed with phases where there are no such @@ -973,7 +973,7 @@ libc_hidden_proto (__libc_mallopt) having to zero memory over and over again The implementation works with a sliding threshold, which is by default - limited to go between 128Kb and 32Mb (64Mb for 64 bitmachines) and starts + limited to go between 128Kb and 32Mb (64Mb for 64 bit machines) and starts out at 128Kb as per the 2001 default. This allows us to satisfy requirement 1) under the assumption that long diff --git a/malloc/mcheck-impl.c b/malloc/mcheck-impl.c index 263dc50e42..b3bf680239 100644 --- a/malloc/mcheck-impl.c +++ b/malloc/mcheck-impl.c @@ -46,7 +46,7 @@ struct hdr It is only constructed if the pedantic testing is requested. */ static struct hdr *root; -/* Nonzero if pedentic checking of all blocks is requested. */ +/* Nonzero if pedantic checking of all blocks is requested. */ static bool pedantic; #if defined _LIBC || defined STDC_HEADERS || defined USG diff --git a/malloc/memusage.c b/malloc/memusage.c index 2279426236..f539c11418 100644 --- a/malloc/memusage.c +++ b/malloc/memusage.c @@ -942,7 +942,7 @@ dest (void) failed[idx_munmap] ? "\e[01;41m" : "", (unsigned long int) failed[idx_munmap]); - /* Write out a histoogram of the sizes of the allocations. */ + /* Write out a histogram of the sizes of the allocations. */ fprintf (stderr, "\e[01;32mHistogram for block sizes:\e[0;0m\n"); /* Determine the maximum of all calls for each size range. */ diff --git a/malloc/tst-aligned-alloc-random-thread.c b/malloc/tst-aligned-alloc-random-thread.c index db94c24a09..a582ec6307 100644 --- a/malloc/tst-aligned-alloc-random-thread.c +++ b/malloc/tst-aligned-alloc-random-thread.c @@ -89,7 +89,7 @@ run_allocations (void *arg) xpthread_barrier_wait (&barrier); - /* Stage 2: Half of the threads allocationg memory and the other + /* Stage 2: Half of the threads allocating memory and the other * half deallocating: * - In the non cross-thread dealloc scenario the first half will be * deallocating the memory allocated by themselves in stage 1 and the diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index 5fe31c266c..9150411271 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -97,8 +97,8 @@ __pthread_cancel (pthread_t th) EINTR). So pthread_cancel cannot send SIGCANCEL unless the cancellation is enabled. In this case the target thread is set as 'cancelled' (CANCELED_BITMASK) - by atomically setting 'cancelhandling' and the cancelation will be acted - upon on next cancellation entrypoing in the target thread. + by atomically setting 'cancelhandling' and the cancellation will be acted + upon on next cancellation entrypoint in the target thread. It also requires to atomically check if cancellation is enabled, so the state are also tracked on 'cancelhandling'. */ @@ -113,7 +113,7 @@ __pthread_cancel (pthread_t th) if (oldval == newval) break; - /* Only send the SIGANCEL signal if cancellation is enabled, since some + /* Only send the SIGCANCEL signal if cancellation is enabled, since some syscalls are never restarted even with SA_RESTART. The signal will act iff async cancellation is enabled. */ if (cancel_enabled (newval)) diff --git a/sysdeps/aarch64/dl-gcs.c b/sysdeps/aarch64/dl-gcs.c index 841d6428d6..4961ad75eb 100644 --- a/sysdeps/aarch64/dl-gcs.c +++ b/sysdeps/aarch64/dl-gcs.c @@ -86,7 +86,7 @@ check_gcs (struct link_map *l, const char *program, bool enforced, if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SECURITY)) warn (l, program); /* Binary is not marked and loaded via dlopen: abort. Also, do not - fail is optional dlopne_mode is being used with audit modules without + fail is optional dlopen_mode is being used with audit modules without GCS support. */ if (program == NULL && (dlopen_mode & __RTLD_AUDIT) == 0) fail (l, program); diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 0fcc14999c..76afc5df7d 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1247,7 +1247,7 @@ extern struct link_map * _dl_get_dl_main_map (void) attribute_hidden; /* Find origin of the executable. */ extern const char *_dl_get_origin (void) attribute_hidden; -/* Return the canonalized path name from the opened file descriptor FD, +/* Return the canonicalized path name from the opened file descriptor FD, or NULL otherwise. */ extern char * _dl_canonicalize (int fd) attribute_hidden; @@ -1387,7 +1387,7 @@ link_map_audit_state (struct link_map *l, size_t index) } /* Call the la_objsearch from the audit modules from the link map L. If - ORIGNAME is non NULL, it is updated with the revious name prior calling + ORIGNAME is non NULL, it is updated with the previous name prior calling la_objsearch. */ const char *_dl_audit_objsearch (const char *name, struct link_map *l, unsigned int code)