home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
x
/
xntp3.zip
/
lib
/
emalloc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-07-18
|
301b
|
20 lines
/*
* emalloc - return new memory obtained from the system. Belch if none.
*/
#include <stdio.h>
#include <syslog.h>
char *
emalloc(size)
unsigned int size;
{
char *mem;
extern char *malloc();
if ((mem = malloc(size)) == 0) {
syslog(LOG_ERR, "No more memory!");
exit(1);
}
return mem;
}