Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
[ghc.git] / rts / hooks / MallocFail.c
1 /* -----------------------------------------------------------------------------
2 *
3 * User-overridable RTS hooks.
4 *
5 * ---------------------------------------------------------------------------*/
6
7 #include "PosixSource.h"
8 #include "Rts.h"
9
10 #include <stdio.h>
11
12 void
13 MallocFailHook (lnat request_size /* in bytes */, char *msg)
14 {
15 fprintf(stderr, "malloc: failed on request for %" FMT_SizeT " bytes; message: %s\n", request_size, msg);
16 }
17