Am 20.05.2014 00:52, schrieb Dicebot:

On Mon, 19 May 2014 15:52:20 +0200, Sönke Ludwig wrote:

Am 19.05.2014 13:32, schrieb Luís Marques:

On Thu, 15 May 2014 05:53:55 GMT, Nikolay Tolstokulakov wrote:

I suggest you enable memory error handler:

import etc.linux.memoryerror;
registerMemoryErrorHandler();

Is that documented? (why not?)

Would also be nice to have that enabled by default.

It can't be. It is not POSIX-compliant, not portable and can potentially corrupt your application on some systems. This is why it was rejected as an official part of standard library and is being kept as extra hidden module.

Good to know, thanks for the info. The question would be how portable it
is, though. The special Windows access violation handler definitely
isn't either. But if for example this would work stable on all X86-Linux
systems, then it could be an option to enable it only there (until
someone implements it for other systems).

Of course, if the register hacking is highly fragile and could break
with the next (or previous) libc or kernel version then that's not
possible. But in that case it should be documented how dangerous it is.
The thing is that it would be really handy to have by default for server
apps. Anyway, I'll just mention it in the vibe.d documentation for now.