summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-11-01 09:11:35 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-11-01 15:12:18 +0300
commitc0ed749a4b3fa1f65e2c62da1ea896a5e8fe6958 (patch)
treed6f7b4f9b063e625f70969c027caa97aad0ca65f
parent11d09a1624fcb42d3d392cc67653b372d0bb6925 (diff)
downloadbdwgc-c0ed749a4b3fa1f65e2c62da1ea896a5e8fe6958.tar.gz
Remove trailing dot in WARN messages
(refactoring) Also, polish some WARN messages in GC_init. * allchblk.c (GC_allochblk_nth): Place space at the beginning of the 2nd half of the WARN message string literal (instead of the end of the 1st half). * misc.c (GC_init): Likewise. * os_dep.c [GWW_VDB] (GC_gww_read_dirty): Likewise. * misc.c (GC_init): Remove trailing dot in WARN message; adjust (make uniform) WARN message about ignoring the value. * os_dep.c [MPROTECT_VDB && DARWIN && BROKEN_EXCEPTION_HANDLING] (GC_dirty_init): No not break WARN message string literal into two parts unnecessarily.
-rw-r--r--allchblk.c4
-rw-r--r--misc.c13
-rw-r--r--os_dep.c8
3 files changed, 13 insertions, 12 deletions
diff --git a/allchblk.c b/allchblk.c
index d04a7008..a5a356f5 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -840,8 +840,8 @@ GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n, int may_split)
/* Punt, since anything else risks unreasonable heap growth. */
if (++GC_large_alloc_warn_suppressed
>= GC_large_alloc_warn_interval) {
- WARN("Repeated allocation of very large block "
- "(appr. size %" WARN_PRIuPTR " KiB):\n"
+ WARN("Repeated allocation of very large block"
+ " (appr. size %" WARN_PRIuPTR " KiB):\n"
"\tMay lead to memory leak and poor performance\n",
(word)size_needed >> 10);
GC_large_alloc_warn_suppressed = 0;
diff --git a/misc.c b/misc.c
index cc5f735a..23f3690d 100644
--- a/misc.c
+++ b/misc.c
@@ -1156,8 +1156,8 @@ GC_API void GC_CALL GC_init(void)
if (0 != interval_string) {
long interval = atol(interval_string);
if (interval <= 0) {
- WARN("GC_LARGE_ALLOC_WARN_INTERVAL environment variable has "
- "bad value: Ignoring\n", 0);
+ WARN("GC_LARGE_ALLOC_WARN_INTERVAL environment variable has"
+ " bad value - ignoring\n", 0);
} else {
GC_large_alloc_warn_interval = interval;
}
@@ -1225,7 +1225,7 @@ GC_API void GC_CALL GC_init(void)
GC_exclude_static_roots_inner(beginGC_aobjfreelist, endGC_aobjfreelist);
# endif
# if defined(USE_PROC_FOR_LIBRARIES) && defined(GC_LINUX_THREADS)
- WARN("USE_PROC_FOR_LIBRARIES + GC_LINUX_THREADS performs poorly.\n", 0);
+ WARN("USE_PROC_FOR_LIBRARIES + GC_LINUX_THREADS performs poorly\n", 0);
/* If thread stacks are cached, they tend to be scanned in */
/* entirety as part of the root set. This will grow them to */
/* maximum size, and is generally not desirable. */
@@ -1241,7 +1241,8 @@ GC_API void GC_CALL GC_init(void)
} else {
# if (defined(LINUX) || defined(HPUX)) && defined(IA64)
if (GC_register_stackbottom == 0) {
- WARN("GC_register_stackbottom should be set with GC_stackbottom\n", 0);
+ WARN("GC_register_stackbottom should be set with GC_stackbottom\n",
+ 0);
/* The following may fail, since we may rely on */
/* alignment properties that may not hold with a user set */
/* GC_stackbottom. */
@@ -1303,7 +1304,7 @@ GC_API void GC_CALL GC_init(void)
if (sz_str != NULL) {
word value = GC_parse_mem_size_arg(sz_str);
if (GC_WORD_MAX == value) {
- WARN("Bad initial heap size %s - ignoring it.\n", sz_str);
+ WARN("Bad initial heap size %s - ignoring\n", sz_str);
} else {
initial_heap_sz = value;
}
@@ -1314,7 +1315,7 @@ GC_API void GC_CALL GC_init(void)
if (sz_str != NULL) {
word max_heap_sz = GC_parse_mem_size_arg(sz_str);
if (max_heap_sz < initial_heap_sz || GC_WORD_MAX == max_heap_sz) {
- WARN("Bad maximum heap size %s - ignoring it.\n", sz_str);
+ WARN("Bad maximum heap size %s - ignoring\n", sz_str);
} else {
if (0 == GC_max_retries) GC_max_retries = 2;
GC_set_max_heap_size(max_heap_sz);
diff --git a/os_dep.c b/os_dep.c
index 5868e99a..94219b23 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -3022,8 +3022,8 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void)
if (i != 0 && last_warned != start && warn_count++ < 5) {
last_warned = start;
- WARN("GC_gww_read_dirty unexpectedly failed at %p: "
- "Falling back to marking all pages dirty\n", start);
+ WARN("GC_gww_read_dirty unexpectedly failed at %p:"
+ " Falling back to marking all pages dirty\n", start);
}
if (!output_unneeded) {
unsigned j;
@@ -4678,8 +4678,8 @@ GC_INNER GC_bool GC_dirty_init(void)
GC_VERBOSE_LOG_PRINTF("Initializing mach/darwin mprotect"
" virtual dirty bit implementation\n");
# ifdef BROKEN_EXCEPTION_HANDLING
- WARN("Enabling workarounds for various darwin "
- "exception handling bugs\n", 0);
+ WARN("Enabling workarounds for various darwin exception handling bugs\n",
+ 0);
# endif
if (GC_page_size % HBLKSIZE != 0) {
ABORT("Page size not multiple of HBLKSIZE");