summaryrefslogtreecommitdiff
path: root/ghc/rts/hooks/MallocFail.c
blob: 1218d1d8d0122d392d4df48cb83193a3c7deef37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* -----------------------------------------------------------------------------
 *
 * User-overridable RTS hooks.
 *
 * ---------------------------------------------------------------------------*/

#include "Rts.h"

#include <stdio.h>

void
MallocFailHook (lnat request_size /* in bytes */, char *msg)
{
    fprintf(stderr, "malloc: failed on request for %lu bytes; message: %s\n", request_size, msg);
}