changeset 32693:8223a86fa594

(_malloc_internal) [GC_MALLOC_CHECK]: Use _malloc_internal instead of malloc. (_free_internal) [GC_MALLOC_CHECK]: Use _free_internal instead of free.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 20 Oct 2000 15:55:37 +0000
parents 0343fe9ef3ac
children 8c9daad87816
files src/gmalloc.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gmalloc.c	Fri Oct 20 15:55:14 2000 +0000
+++ b/src/gmalloc.c	Fri Oct 20 15:55:37 2000 +0000
@@ -678,7 +678,11 @@
 	{
 	  /* No free fragments of the desired size, so get a new block
 	     and break it into fragments, returning the first.  */
+#ifdef GC_MALLOC_CHECK
+	  result = _malloc_internal (BLOCKSIZE);
+#else
 	  result = malloc (BLOCKSIZE);
+#endif
 	  if (result == NULL)
 	    return NULL;
 
@@ -1092,7 +1096,11 @@
 	  _chunks_free -= BLOCKSIZE >> type;
 	  _bytes_free -= BLOCKSIZE;
 
+#ifdef GC_MALLOC_CHECK
+	  _free_internal (ADDRESS (block));
+#else
 	  free (ADDRESS (block));
+#endif
 	}
       else if (_heapinfo[block].busy.info.frag.nfree != 0)
 	{