summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-06-28 11:50:27 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-06-28 11:50:27 +0400
commita54e2c050b9cf161cbccc3dd4628f8ef6b64f519 (patch)
tree447eb906b698dee37a17779ea15f448079b8f54b /src/alloc.c
parent1c9bd87017e4b5f7f56e734277ff6e0a0ebb51d6 (diff)
downloademacs-a54e2c050b9cf161cbccc3dd4628f8ef6b64f519.tar.gz
emacs-a54e2c050b9cf161cbccc3dd4628f8ef6b64f519.tar.bz2
emacs-a54e2c050b9cf161cbccc3dd4628f8ef6b64f519.zip
Generalize run-time debugging checks.
* configure.in (ENABLE_CHECKING): Update comment. * src/dispextern.h (XASSERTS): Remove. * src/fontset.c (xassert): Remove. Convert from xassert to eassert. * src/alloc.c: Convert from xassert to eassert. * src/bidi.c: Likewise. * src/dispnew.c: Likewise. * src/fns.c: Likewise. * src/fringe.c: Likewise. * src/ftfont.c: Likewise. * src/gtkutil.c: Likewise. * src/image.c: Likewise. * src/keyboard.c: Likewise. * src/menu.c: Likewise. * src/process.c: Likewise. * src/scroll.c: Likewise. * src/sound.c: Likewise. * src/term.c: Likewise. * src/w32console.c: Likewise. * src/w32fns.c: Likewise. * src/w32term.c: Likewise. * src/window.c: Likewise. * src/xdisp.c: Likewise. * src/xfaces.c: Likewise. * src/xfns.c: Likewise. * src/xselect.c: Likewise. * src/xterm.c: Likewise.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 17212f8d37d..2570364e6c1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -787,7 +787,7 @@ verify (INT_MAX <= PTRDIFF_MAX);
void *
xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size)
{
- xassert (0 <= nitems && 0 < item_size);
+ eassert (0 <= nitems && 0 < item_size);
if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems)
memory_full (SIZE_MAX);
return xmalloc (nitems * item_size);
@@ -800,7 +800,7 @@ xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size)
void *
xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size)
{
- xassert (0 <= nitems && 0 < item_size);
+ eassert (0 <= nitems && 0 < item_size);
if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems)
memory_full (SIZE_MAX);
return xrealloc (pa, nitems * item_size);
@@ -850,7 +850,7 @@ xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
ptrdiff_t nitems_incr_max = n_max - n;
ptrdiff_t incr = max (nitems_incr_min, min (incr_estimate, nitems_incr_max));
- xassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max);
+ eassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max);
if (! pa)
*nitems = 0;
if (nitems_incr_max < incr)
@@ -2220,7 +2220,7 @@ compact_small_strings (void)
for (b = oldest_sblock; b; b = b->next)
{
end = b->next_free;
- xassert ((char *) end <= (char *) b + SBLOCK_SIZE);
+ eassert ((char *) end <= (char *) b + SBLOCK_SIZE);
for (from = &b->first_data; from < end; from = from_end)
{
@@ -2271,7 +2271,7 @@ compact_small_strings (void)
/* Copy, and update the string's `data' pointer. */
if (from != to)
{
- xassert (tb != b || to < from);
+ eassert (tb != b || to < from);
memmove (to, from, nbytes + GC_STRING_EXTRA);
to->string->data = SDATA_DATA (to);
}