source: anuga_work/development/anugavis/src/xmalloc.c @ 5261

Last change on this file since 5261 was 5261, checked in by jack, 17 years ago

AnugaVis?: read lists of x and y points from NetCDF file.

File size: 338 bytes
Line 
1#ifdef HAVE_CONFIG_H
2#  include "config.h"
3#endif
4
5#ifdef HAVE_STDLIB_H
6#  include <stdlib.h>
7#endif
8#include "error.h"
9#include "xmalloc.h"
10
11void *xmalloc(size_t size, const char *func){
12  void *mem;
13  if((mem = malloc(size)) == NULL)
14    AnugaVis_SetError("Failed to malloc %d bytes in %s", size, func);
15  return mem;
16}
Note: See TracBrowser for help on using the repository browser.