*/
void
scm_gc_mark (SCM p)
+#define FUNC_NAME "scm_gc_mark"
{
register long i;
register SCM ptr;
gc_mark_nimp:
if (SCM_NCELLP (ptr))
- scm_wta (ptr, "rogue pointer in heap", NULL);
+ SCM_MISC_ERROR ("rogue pointer in heap", SCM_EOL);
switch (SCM_TYP7 (ptr))
{
}
break;
default:
- def:scm_wta (ptr, "unknown type in ", "gc_mark");
+ def:
+ SCM_MISC_ERROR ("unknown type", SCM_EOL);
}
}
+#undef FUNC_NAME
/* Mark a Region Conservatively
void
scm_gc_sweep ()
+#define FUNC_NAME "scm_gc_sweep"
{
register SCM_CELLPTR ptr;
register SCM nfreelist;
}
break;
default:
- sweeperr:scm_wta (scmptr, "unknown type in ", "gc_sweep");
+ sweeperr:
+ SCM_MISC_ERROR ("unknown type", SCM_EOL);
}
#if 0
if (SCM_CAR (scmptr) == (SCM) scm_tc_free_cell)
scm_mallocated -= m;
scm_gc_malloc_collected = m;
}
+#undef FUNC_NAME
\f
return ptr;
}
- scm_wta (SCM_MAKINUM (size), (char *) SCM_NALLOC, what);
- return 0; /* never reached */
+ scm_memory_error (what);
}
return ptr;
}
- scm_wta (SCM_MAKINUM (size), (char *) SCM_NALLOC, what);
- return 0; /* never reached */
+ scm_memory_error (what);
}
+
void
scm_must_free (void *obj)
+#define FUNC_NAME "scm_must_free"
{
#ifdef GUILE_DEBUG_MALLOC
scm_malloc_unregister (obj);
if (obj)
free (obj);
else
- scm_wta (SCM_INUM0, "already free", "");
+ SCM_MISC_ERROR ("freeing NULL pointer", SCM_EOL);
}
+#undef FUNC_NAME
+
/* Announce that there has been some malloc done that will be freed
* during gc. A typical use is for a smob that uses some malloced
static void
alloc_some_heap (scm_freelist_t *freelist)
+#define FUNC_NAME "alloc_some_heap"
{
scm_heap_seg_data_t * tmptable;
SCM_CELLPTR ptr;
* aren't supposed to add heap segments.
*/
if (scm_gc_heap_lock)
- scm_wta (SCM_UNDEFINED, "need larger initial", "heap");
+ SCM_MISC_ERROR ("can not grow heap while locked", SCM_EOL);
/* Expand the heap tables to have room for the new segment.
* Do not yet increment scm_n_heap_segs -- that is done by init_heap_seg
SCM_SYSCALL (tmptable = ((scm_heap_seg_data_t *)
realloc ((char *)scm_heap_table, len)));
if (!tmptable)
- scm_wta (SCM_UNDEFINED, "could not grow", "hplims");
+ SCM_MISC_ERROR ("could not grow heap segment table", SCM_EOL);
else
scm_heap_table = tmptable;
}
}
- scm_wta (SCM_UNDEFINED, "could not grow", "heap");
+ SCM_MISC_ERROR ("could not grow heap", SCM_EOL);
}
+#undef FUNC_NAME
SCM_DEFINE (scm_unhash_name, "unhash-name", 1, 0, 0,