Mercurial > projects > ddmd
diff dmd/Library.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/Library.d Sat Oct 24 17:25:59 2009 +0400 +++ b/dmd/Library.d Sun Oct 25 03:20:59 2009 +0300 @@ -18,6 +18,8 @@ import std.string; +import dmd.Memory; + align(1) struct LibHeader { @@ -943,9 +945,9 @@ } // Allocate dictionary if (bucketsP) - bucketsP = cast(ubyte*)realloc(bucketsP, ndicpages * BUCKETPAGE); + bucketsP = cast(ubyte*)GC.realloc(bucketsP, ndicpages * BUCKETPAGE); else - bucketsP = cast(ubyte*)malloc(ndicpages * BUCKETPAGE); + bucketsP = cast(ubyte*)GC.malloc(ndicpages * BUCKETPAGE); assert(bucketsP); memset(bucketsP, 0, ndicpages * BUCKETPAGE); for (uint u = 0; u < ndicpages; u++) @@ -961,8 +963,8 @@ // Write dictionary libbuf.write(bucketsP, ndicpages * BUCKETPAGE); - if (bucketsP) - free(bucketsP); + ///if (bucketsP) + /// free(bucketsP); // Create library header Libheader libHeader;