Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2
#include 
3
#include 
4
#include 
5
 
6
static char msg[] = "Fatal: malloc returned NULL\r\n";
7
 
8
void * xmalloc(size_t _sz);
9
void *
10
xmalloc(size_t _sz)
11
{
12
  void *rv = malloc(_sz?_sz:1);
13
  if (rv == 0)
14
  {
15
    __libclog_printf(msg);
16
    _exit(1);
17
  }
18
  return rv;
19
}