Mercurial > projects > dstress
diff run/new_08.d @ 889:b3da1b510a19
div. memory management
author | thomask |
---|---|
date | Mon, 06 Mar 2006 08:01:27 +0000 |
parents | e555e1460d7e |
children |
line wrap: on
line diff
--- a/run/new_08.d Sun Mar 05 21:57:33 2006 +0000 +++ b/run/new_08.d Mon Mar 06 08:01:27 2006 +0000 @@ -4,22 +4,20 @@ module dstress.run.new_08; -extern(C) void *malloc(size_t size); - int counter; int counter2; class Parent{ new(size_t size){ counter++; - return malloc(size); + return (new byte[size]).ptr; } } class Child : Parent{ new(size_t size){ counter2++; - return malloc(size); + return (new byte[size]).ptr; } }