Mercurial > projects > ldc
annotate lphobos/std/outofmemory.d @ 131:5825d48b27d1 trunk
[svn r135] * Merged DMD 1.025 *
* Fixed a minor linking order mishap *
* Added an command line option -annotate *
* Fixed some problems with running optimizations *
* Added std.stdio and dependencies to lphobos (still not 100% working, but compiles and links) *
* Fixed problems with passing aggregate types to variadic functions *
* Added initial code towards full GC support, currently based on malloc and friends, not all the runtime calls the GC yet for memory *
* Fixed problems with resolving nested function context pointers for some heavily nested cases *
* Redid function argument passing + other minor code cleanups, still lots to do on this end... *
author | lindquist |
---|---|
date | Fri, 04 Jan 2008 01:38:42 +0100 |
parents | ccca1c13e13a |
children | 88e23f8c2354 |
rev | line source |
---|---|
89 | 1 /** |
2 * Macros: | |
3 * WIKI=Phobos/StdOutOfMemory | |
4 * Copyright: | |
5 * Placed into public domain. | |
6 * www.digitalmars.com | |
7 */ | |
8 | |
9 | |
10 module std.outofmemory; | |
11 | |
12 /****** | |
13 * This exception is thrown when out of memory errors happen. | |
14 */ | |
15 | |
16 class OutOfMemoryException : Exception | |
17 { | |
18 static char[] s = "Out of memory"; | |
19 | |
20 /** | |
21 * Default constructor | |
22 */ | |
23 this() | |
24 { | |
25 super(s); | |
26 } | |
27 | |
28 char[] toString() | |
29 { | |
30 return s; | |
31 } | |
32 } | |
33 | |
34 extern (C) void _d_OutOfMemory() | |
35 { | |
36 assert(0); | |
37 /*throw cast(OutOfMemoryException) | |
38 cast(void *) | |
39 OutOfMemoryException.classinfo.init;*/ | |
40 } | |
41 | |
42 static this() | |
43 { | |
44 } |