summaryrefslogtreecommitdiff
path: root/tal-debug.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-06-20 02:25:59 +0200
committerKevin Ryde <user42@zip.com.au>2001-06-20 02:25:59 +0200
commit0c7a3099719d67d7a5e23980ca037c4a19e0dabf (patch)
treeadca34a004c1760b39ce42397294f6856b69d92a /tal-debug.c
parentc30d957ae118e88224602a32f6a2b2579dc491b1 (diff)
downloadgmp-0c7a3099719d67d7a5e23980ca037c4a19e0dabf.tar.gz
More of:
* configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC, selected with --enable-alloca=debug. The reentrant malloc is going to call malloc with the size given to TMP_ALLOC, and since malloc(0) isn't portable we want to get rid of any TMP_ALLOC(0)s. Whether that proves too difficult is another matter.
Diffstat (limited to 'tal-debug.c')
-rw-r--r--tal-debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tal-debug.c b/tal-debug.c
index 99fedb10e..3606cf574 100644
--- a/tal-debug.c
+++ b/tal-debug.c
@@ -76,6 +76,8 @@ __gmp_tmp_debug_alloc (const char *file, int line,
struct tmp_debug_t *mark = *markp;
struct tmp_debug_entry_t *p;
+ ASSERT_ALWAYS (size >= 1);
+
if (mark == NULL)
{
__gmp_assert_header (file, line);