diff dmd/Util.d @ 175:94b6033c07f3

get rid of globals malloc -> GC.malloc
author korDen
date Sun, 10 Oct 2010 03:48:06 +0400
parents af724d3510d7
children 1475fd394c9e
line wrap: on
line diff
--- a/dmd/Util.d	Sun Oct 10 03:47:23 2010 +0400
+++ b/dmd/Util.d	Sun Oct 10 03:48:06 2010 +0400
@@ -929,7 +929,7 @@
 	    argv.push(cast(void *)p);
 	else
 	{
-	    char *s = cast(char *)malloc(plen + 3);
+	    char *s = cast(char *)GC.malloc(plen + 3);
 	    s[0] = '-';
 	    s[1] = 'l';
 	    memcpy(s + 2, p, plen + 1);
@@ -943,7 +943,7 @@
     const char *libname = (global.params.symdebug)
 				? global.params.debuglibname
 				: global.params.defaultlibname;
-    char *buf = cast(char *)malloc(2 + strlen(libname) + 1);
+    char *buf = cast(char *)GC.malloc(2 + strlen(libname) + 1);
     strcpy(buf, "-l");
     strcpy(buf + 2, libname);
     argv.push(cast(void *)buf);		// turns into /usr/lib/libphobos2.a
@@ -1044,7 +1044,7 @@
     if (len > 255)
     {   
 		char* q;
-		static char[9] envname = "@_CMDLINE";
+		char[9] envname = "@_CMDLINE";
 
 		envname[0] = '@';
 		switch (useenv)