[m-rev.] diff: don't call GC before initialisation
Julien Fischer
juliensf at csse.unimelb.edu.au
Sat Dec 17 15:08:30 AEDT 2011
Branches: main, 11.07
util/mkinit.c:
Don't call the GC before it has been initialised.
Julien.
Index: util/mkinit.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.127
diff -u -r1.127 mkinit.c
--- util/mkinit.c 16 Dec 2011 03:38:20 -0000 1.127
+++ util/mkinit.c 17 Dec 2011 04:04:42 -0000
@@ -545,11 +545,11 @@
" char **argv;\n"
" int i;\n"
"\n"
- " argv = MR_GC_NEW_ARRAY(char *, argc + 1);\n"
+ " argv = MR_NEW_ARRAY(char *, argc + 1);\n"
" for (i = 0; i < argc; i++) {\n"
" int bytes = WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1,\n"
" NULL, 0, NULL, NULL);\n"
- " argv[i] = MR_GC_malloc(bytes);\n"
+ " argv[i] = MR_malloc(bytes);\n"
" WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1,\n"
" argv[i], bytes, NULL, NULL);\n"
" }\n"
@@ -572,11 +572,11 @@
" if (__wgetmainargs(&argc, &wargv, &wenv, 0, &start_info) != 0) {\n"
" return;\n"
" }\n"
- " argv = MR_GC_NEW_ARRAY(char *, argc + 1);\n"
+ " argv = MR_NEW_ARRAY(char *, argc + 1);\n"
" for (i = 0; i < argc; i++) {\n"
" int bytes = WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1,\n"
" NULL, 0, NULL, NULL);\n"
- " argv[i] = MR_GC_malloc(bytes);\n"
+ " argv[i] = MR_malloc(bytes);\n"
" WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1,\n"
" argv[i], bytes, NULL, NULL);\n"
" }\n"
--------------------------------------------------------------------------
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