[project @ 2003-09-12 16:26:05 by sof]
[ghc-hetmet.git] / ghc / rts / hooks / MallocFail.c
1 /* -----------------------------------------------------------------------------
2  * $Id: MallocFail.c,v 1.3 2002/07/17 09:21:51 simonmar Exp $
3  *
4  * User-overridable RTS hooks.
5  *
6  * ---------------------------------------------------------------------------*/
7
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 %lu bytes; message: %s\n", request_size, msg);
16 }
17