changeset 472:31cca2b25cf6

OutOfMemory not called Manfred Nowak <svv1999@hotmail.com> 2005-04-023 news:d4a8b9$1rr3$1@digitaldaemon.com
author thomask
date Sat, 23 Apr 2005 06:55:16 +0000
parents 39eb3d2a70ed
children 8a58d34b8221
files run/OutOfMemory_03.d
diffstat 1 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/OutOfMemory_03.d	Sat Apr 23 06:55:16 2005 +0000
@@ -0,0 +1,28 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Manfred Nowak <svv1999@hotmail.com>
+// @date@	2005-04-023
+// @uri@	news:d4a8b9$1rr3$1@digitaldaemon.com
+
+module dstress.run.OutOfMemory_03;
+
+debug import std.c.stdio;
+
+Object[] a;
+
+int main(){
+	int delta= 100000;
+	while(1){
+		try{
+			a.length = a.length + delta;
+debug			fprintf(stderr,"%d ", a.length);
+		}catch{
+debug			fprintf(stderr, "Allocated array of length %d.\n", a.length);
+			return 0;
+		}
+	}
+	assert(0)
+}
+