summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivmai <ivmai>2010-12-26 15:50:53 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:55 +0400
commit1c76fc46d5d0894a34a8c31dced57087cca90611 (patch)
tree3c3a36650d8c2293e5f326ecf2f5efa53edb667d
parent7b66e36f08dd096bc6df1ebc362d2689264f7825 (diff)
downloadbdwgc-1c76fc46d5d0894a34a8c31dced57087cca90611.tar.gz
2010-12-26 Ivan Maidanski <ivmai@mail.ru>
* alloc.c (GC_collect_or_expand): Replace NIL with NULL in message. * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn, GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, GC_debug_malloc_atomic_uncollectable): Ditto. * gcj_mlc.c (GC_debug_gcj_malloc): Ditto. * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a comment. * dyn_load.c (GC_FirstDLOpenedLinkMap): Ditto. * mark_rts.c (GC_roots_present): Ditto. * doc/README: Ditto. * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Ditto. * include/private/gc_priv.h (_GC_arrays): Ditto.
-rw-r--r--ChangeLog18
-rw-r--r--alloc.c2
-rw-r--r--dbg_mlc.c20
-rw-r--r--doc/README3
-rw-r--r--dyn_load.c4
-rw-r--r--gcj_mlc.c2
-rw-r--r--include/private/gc_hdrs.h2
-rw-r--r--include/private/gc_priv.h2
-rw-r--r--mark_rts.c4
9 files changed, 37 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 382fa1b0..db09a9c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-26 Ivan Maidanski <ivmai@mail.ru>
+
+ * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
+ * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
+ GC_debug_malloc_atomic_ignore_off_page,
+ GC_debug_generic_malloc_inner,
+ GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
+ GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
+ GC_debug_malloc_atomic_uncollectable): Ditto.
+ * gcj_mlc.c (GC_debug_gcj_malloc): Ditto.
+ * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
+ comment.
+ * dyn_load.c (GC_FirstDLOpenedLinkMap): Ditto.
+ * mark_rts.c (GC_roots_present): Ditto.
+ * doc/README: Ditto.
+ * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Ditto.
+ * include/private/gc_priv.h (_GC_arrays): Ditto.
+
2010-12-26 Ivan Maidanski <ivmai@mail.ru> (mostly really Geoff Norton
and Jonathan Pryor)
diff --git a/alloc.c b/alloc.c
index 061c0747..9cadfeca 100644
--- a/alloc.c
+++ b/alloc.c
@@ -1275,7 +1275,7 @@ GC_INNER GC_bool GC_collect_or_expand(word needed_blocks,
} else {
# if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC)
WARN("Out of Memory! Heap size: %" GC_PRIdPTR " MiB."
- " Returning NIL!\n", (GC_heapsize - GC_unmapped_bytes) >> 20);
+ " Returning NULL!\n", (GC_heapsize - GC_unmapped_bytes) >> 20);
# endif
RESTORE_CANCEL(cancel_state);
return(FALSE);
diff --git a/dbg_mlc.c b/dbg_mlc.c
index 1a7d0f2a..1de97ff8 100644
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -307,7 +307,7 @@ STATIC ptr_t GC_store_debug_info_inner(ptr_t p, word sz, char *string,
#ifndef SHORT_DBG_HDRS
/* Check the object with debugging info at ohdr */
- /* return NIL if it's OK. Else return clobbered */
+ /* return NULL if it's OK. Else return clobbered */
/* address. */
STATIC ptr_t GC_check_annotated_obj(oh *ohdr)
{
@@ -471,7 +471,7 @@ GC_API void * GC_CALL GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
void * result = GC_malloc(lb + DEBUG_BYTES);
if (result == 0) {
- GC_err_printf("GC_debug_malloc(%lu) returning NIL (",
+ GC_err_printf("GC_debug_malloc(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%ld)\n", (unsigned long)i);
@@ -490,7 +490,7 @@ GC_API void * GC_CALL GC_debug_malloc_ignore_off_page(size_t lb,
void * result = GC_malloc_ignore_off_page(lb + DEBUG_BYTES);
if (result == 0) {
- GC_err_printf("GC_debug_malloc_ignore_off_page(%lu) returning NIL (",
+ GC_err_printf("GC_debug_malloc_ignore_off_page(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%lu)\n", (unsigned long)i);
@@ -510,7 +510,7 @@ GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb,
if (result == 0) {
GC_err_printf("GC_debug_malloc_atomic_ignore_off_page(%lu)"
- " returning NIL (", (unsigned long) lb);
+ " returning NULL (", (unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%lu)\n", (unsigned long)i);
return(0);
@@ -536,7 +536,7 @@ GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb,
void * result = GC_generic_malloc_inner(lb + DEBUG_BYTES, k);
if (result == 0) {
- GC_err_printf("GC internal allocation (%lu bytes) returning NIL\n",
+ GC_err_printf("GC internal allocation (%lu bytes) returning NULL\n",
(unsigned long) lb);
return(0);
}
@@ -551,7 +551,7 @@ GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb,
lb + DEBUG_BYTES, k);
if (result == 0) {
- GC_err_printf("GC internal allocation (%lu bytes) returning NIL\n",
+ GC_err_printf("GC internal allocation (%lu bytes) returning NULL\n",
(unsigned long) lb);
return(0);
}
@@ -566,7 +566,7 @@ GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS)
void * result = GC_malloc_stubborn(lb + DEBUG_BYTES);
if (result == 0) {
- GC_err_printf("GC_debug_malloc(%lu) returning NIL (",
+ GC_err_printf("GC_debug_malloc(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%lu)\n", (unsigned long)i);
@@ -633,7 +633,7 @@ GC_API void * GC_CALL GC_debug_malloc_atomic(size_t lb, GC_EXTRA_PARAMS)
void * result = GC_malloc_atomic(lb + DEBUG_BYTES);
if (result == 0) {
- GC_err_printf("GC_debug_malloc_atomic(%lu) returning NIL (",
+ GC_err_printf("GC_debug_malloc_atomic(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%lu)\n", (unsigned long)i);
@@ -674,7 +674,7 @@ GC_API void * GC_CALL GC_debug_malloc_uncollectable(size_t lb,
void * result = GC_malloc_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES);
if (result == 0) {
- GC_err_printf("GC_debug_malloc_uncollectable(%lu) returning NIL (",
+ GC_err_printf("GC_debug_malloc_uncollectable(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%lu)\n", (unsigned long)i);
@@ -695,7 +695,7 @@ GC_API void * GC_CALL GC_debug_malloc_uncollectable(size_t lb,
if (result == 0) {
GC_err_printf(
- "GC_debug_malloc_atomic_uncollectable(%lu) returning NIL (",
+ "GC_debug_malloc_atomic_uncollectable(%lu) returning NULL (",
(unsigned long) lb);
GC_err_puts(s);
GC_err_printf(":%lu)\n", (unsigned long)i);
diff --git a/doc/README b/doc/README
index b2822904..4a4ff77b 100644
--- a/doc/README
+++ b/doc/README
@@ -440,8 +440,7 @@ collector is invoked while the object is live. The first deallocation
of an object will clear the debugging info associated with an
object, so accidentally repeated calls to GC_debug_free will report the
deallocation of an object without debugging information. Out of
-memory errors will be reported to stderr, in addition to returning
-NIL.
+memory errors will be reported to stderr, in addition to returning NULL.
GC_debug_malloc checking during garbage collection is enabled
with the first call to GC_debug_malloc. This will result in some
diff --git a/dyn_load.c b/dyn_load.c
index 37dd75a2..128be6ed 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -162,7 +162,7 @@ GC_FirstDLOpenedLinkMap(void)
if( tag == DT_DEBUG ) {
struct link_map *lm
= ((struct r_debug *)(dp->d_un.d_ptr))->r_map;
- if( lm != 0 ) cachedResult = lm->l_next; /* might be NIL */
+ if( lm != 0 ) cachedResult = lm->l_next; /* might be NULL */
break;
}
}
@@ -628,7 +628,7 @@ GC_FirstDLOpenedLinkMap(void)
if( tag == DT_DEBUG ) {
struct link_map *lm
= ((struct r_debug *)(dp->d_un.d_ptr))->r_map;
- if( lm != 0 ) cachedResult = lm->l_next; /* might be NIL */
+ if( lm != 0 ) cachedResult = lm->l_next; /* might be NULL */
break;
}
}
diff --git a/gcj_mlc.c b/gcj_mlc.c
index 3108bce6..7d016962 100644
--- a/gcj_mlc.c
+++ b/gcj_mlc.c
@@ -217,7 +217,7 @@ GC_API void * GC_CALL GC_debug_gcj_malloc(size_t lb,
if (result == 0) {
GC_oom_func oom_fn = GC_oom_fn;
UNLOCK();
- GC_err_printf("GC_debug_gcj_malloc(%ld, %p) returning NIL (",
+ GC_err_printf("GC_debug_gcj_malloc(%ld, %p) returning NULL (",
(unsigned long)lb, ptr_to_struct_containing_descr);
GC_err_puts(s);
GC_err_printf(":%d)\n", i);
diff --git a/include/private/gc_hdrs.h b/include/private/gc_hdrs.h
index c5cf27f4..b11365ab 100644
--- a/include/private/gc_hdrs.h
+++ b/include/private/gc_hdrs.h
@@ -194,7 +194,7 @@ typedef struct bi {
# endif
/* Is the result a forwarding address to someplace closer to the */
-/* beginning of the block or NIL? */
+/* beginning of the block or NULL? */
# define IS_FORWARDING_ADDR_OR_NIL(hhdr) ((size_t) (hhdr) <= MAX_JUMP)
/* Get an HBLKSIZE aligned address closer to the beginning of the block */
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h
index b518bf68..ee801a39 100644
--- a/include/private/gc_priv.h
+++ b/include/private/gc_priv.h
@@ -1045,7 +1045,7 @@ struct _GC_arrays {
/* free list for immutable objects */
# ifdef MARK_BIT_PER_GRANULE
short * _obj_map[MAXOBJGRANULES+1];
- /* If not NIL, then a pointer to a map of valid */
+ /* If not NULL, then a pointer to a map of valid */
/* object addresses. */
/* _obj_map[sz_in_granules][i] is */
/* i % sz_in_granules. */
diff --git a/mark_rts.c b/mark_rts.c
index c47e17a5..d808e8e5 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -109,8 +109,8 @@ static int n_root_sets = 0;
return(result);
}
- /* Is a range starting at b already in the table? If so return a */
- /* pointer to it, else NIL. */
+ /* Is a range starting at b already in the table? If so return a */
+ /* pointer to it, else NULL. */
GC_INNER struct roots * GC_roots_present(ptr_t b)
{
int h = rt_hash(b);