// -*- Mode: C++ -*-
// Time-stamp:      <Sat, 10 Jul 1999 15:49:31 MET DST ht>
// Initial version: <Sat, 10 Jul 1999 15:46:33 MET DST ht>

#include <stdlib.h>
#include <stdio.h>

void *operator new (size_t m)
{
    void *p= malloc (m);
    if (!p) {
        fprintf (stderr, "Virtual memory exhausted in operator new()\n");
        fprintf (stderr, "while trying to allocate %lu bytes.\n",
                         (unsigned long)m);
        exit(1);
    }
    fprintf (stderr, "Allocated %lu bytes -> %p\n", (unsigned long)m, p);
    return p;
}

