Mercurial > projects > dstress
diff run/d/delete_12_D.d @ 889:b3da1b510a19
div. memory management
author | thomask |
---|---|
date | Mon, 06 Mar 2006 08:01:27 +0000 |
parents | 4a37bb21b9a1 |
children | 9dcac8d4e97f |
line wrap: on
line diff
--- a/run/d/delete_12_D.d Sun Mar 05 21:57:33 2006 +0000 +++ b/run/d/delete_12_D.d Mon Mar 06 08:01:27 2006 +0000 @@ -6,14 +6,8 @@ // @date@ 2006-02-15 // @uri@ news:dsv036$qlt$1@digitaldaemon.com -// @WARNING@ direct use of Phobos - module dstress.run.d.delete_12_D; -import std.c.stdlib; -import std.outofmemory; -import std.gc; - int status; class Foo{ @@ -22,11 +16,7 @@ new(size_t sz){ void* p; - p = malloc(sz); - - if (!p){ - throw new OutOfMemoryException(); - } + p = (new byte[sz]).ptr; if(status++ != 1){ assert(0);