[m-rev.] diff: fix problem in C grades that don't use conservative GC

Julien Fischer juliensf at csse.unimelb.edu.au
Sun Nov 13 00:08:03 AEDT 2011


Branches: main, 11.07

Don't call a function that doesn't exist in grades that don't use conservative
GC.

runtime/mercury_memory.c:
 	In MR_GC_free_attrib, call MR_GC_free not GC_free.
 	(The corresponding allocation is made with MR_GC_malloc.)

Julien.

Index: runtime/mercury_memory.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_memory.c,v
retrieving revision 1.44
diff -u -r1.44 mercury_memory.c
--- runtime/mercury_memory.c	26 Oct 2011 14:08:45 -0000	1.44
+++ runtime/mercury_memory.c	12 Nov 2011 13:03:11 -0000
@@ -441,7 +441,7 @@
  #ifdef  MR_MPROF_PROFILE_MEMORY_ATTRIBUTION
      ptr = (char *) ptr - sizeof(MR_Word);
  #endif
-    GC_free(ptr);
+    MR_GC_free(ptr);
  }

  /*---------------------------------------------------------------------------*/


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list