diff dmd/Type.d @ 2:7427ded8caf7

Removed unreferenced modules First step at fixing GC issues - now calling GC.malloc instead of malloc (ditto calloc and realloc), get rid of free
author korDen
date Sun, 25 Oct 2009 03:20:59 +0300
parents 10317f0c89a5
children d706d958e4e8
line wrap: on
line diff
--- a/dmd/Type.d	Sat Oct 24 17:25:59 2009 +0400
+++ b/dmd/Type.d	Sun Oct 25 03:20:59 2009 +0300
@@ -63,6 +63,8 @@
 
 import core.stdc.stdio;
 
+import dmd.Memory;
+
 /* These have default values for 32 bit code, they get
  * adjusted for 64 bit code.
  */
@@ -1037,7 +1039,7 @@
 		if (!t)
 		{
 			uint sz = this.classinfo.init.length;
-			t = cast(Type)malloc(sz);
+			t = cast(Type)GC.malloc(sz);
 			memcpy(cast(void*)t, cast(void*)this, sz);
 			t.mod = 0;
 			t.deco = null;
@@ -1088,7 +1090,7 @@
 		if (!t)
 		{
 			uint sz = this.classinfo.init.length;
-			t = cast(Type)malloc(sz);
+			t = cast(Type)GC.malloc(sz);
 			memcpy(cast(void*)t, cast(void*)this, sz);
 			t.mod = MODundefined;
 			t.deco = null;
@@ -1459,7 +1461,7 @@
 	final Type clone()
 	{
 		auto size = this.classinfo.init.length;
-		auto ptr = malloc(size);
+		auto ptr = GC.malloc(size);
 		memcpy(ptr, cast(void*)this, size);
 
 		return cast(Type)ptr;